Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7857077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:55:11+00:00 2026-06-02T20:55:11+00:00

I am creating an app that lets you preview fonts on the web, in

  • 0

I am creating an app that lets you preview fonts on the web, in the same way myfonts does it. Anyone know how they do it so fast?

My method is to generate font previews usign HTML5 Canvas and some Javascript. This is an alternative to doing it server side and generating images using PHP GD library or Imageick.

However, although using HTML5 canvas makes things lightining fast and all the processing is on the client side. I am having trouble hiding the fonts that I load because I have to use font-face to load the fonts:

    @font-face {
        font-family: 'Press Start 2P';
        src: url('fonts/PressStart2P.ttf');
    }

And use JS to render to the canvas:

        $('#draw').click(function () {
            var canvas = $('canvas')[0],
            ctx = canvas.getContext('2d');
            ctx.font = '12px "Press Start 2P"';
            ctx.fillStyle = '#000';
            ctx.fillText('Hello, world!', x, y += 20);
            ctx.fillRect(x - 20, y - 10, 10, 10);
        });

Any ideas on how I can keep the font paths secret or any other alternative methods to generating images really quickly. I need to generate about 40+ images on each page very frequently.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:55:14+00:00Added an answer on June 2, 2026 at 8:55 pm

    I don’t think they generate them really fast at all. The text is static, and cannot be changed by the user, so they can just pregenerate all images.

    If you need your text to be dynamic, indeed you have the option of rendering on the client side or on the server side.

    If you want to “hide” the font from the user, the only way is server-side rendering. There really is no way to allow the browser to use the font, but not allow the user to save it to wherever they like. They can just use the Chrome Inspector or Firebug to access any resource downloaded by your web page, no matter how well you obfuscate the URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an app that lets users take and store photos in a Core
I'm creating an app that needs to be accessed by both a web front
I'm creating an app on Windows Phone 7 that lets folks read offline HTML
I am creating a scheduler web app that stores its data in a mysql
I have a web app that lets users create groups. On the front page
I am creating a feature in my app that lets people take photo in
I'm creating and app that will rely on a database, and I have all
I am creating an app that is having a UIWebView which contains an advert.
I am creating an app that runs on the logitech revue. The UI is
I am creating an app that has three tabs on the main screen. Each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.