Get a free trial // Grow your CSS skills // Land your dream job

Prevent downloading of webfonts from server?

  • # January 13, 2013 at 12:20 am


    I’m curious if there is a preferred method for securing webfonts (@font-face) on a server. I’ve read a few bits about obfuscating the font file to prevent desktop use, and using .htaccess to block outside hot linking of the various files. Is there a more streamline approach to this method that anyone knows? Essentially I do not want users to have access for downloading the font files, etc.


    # January 13, 2013 at 12:23 am

    @Rugg Why, what webfonts are you using that you need to hide them?

    # January 13, 2013 at 12:26 am

    Hi Chris, well none at this point, But if I were to purchase a web font from rather than using a font hosting service like Typekit or Font Deck etc.

    The mentioned services do a fairly great job and protecting their fonts, using various methods, But what if someone hosts their own web fonts?

    # January 13, 2013 at 12:28 am

    @Rugg They will provide you with a zip file that includes the webfonts and CSS.

    # January 13, 2013 at 12:35 am


    That’s what I was summing, but what prevents someone from simply downloading the associated files within the web inspector? Most font hosting sites seem to have configured a secure method preventing access to files, or if access is permitted the font is unable to be used on the desktop because certain details are stripped out.

    How would one serving their own fonts mimic these security measures? It seems quite difficult

    # January 13, 2013 at 12:35 am

    @Rugg The CSS they provide will already be encoded so that won’t be an issue.

    # January 13, 2013 at 12:36 am

    Ahhh. Great that makes sense. I was assuming It would be something similar to the google webfonts css

    # January 13, 2013 at 12:37 am

    @Rugg It will basically look like this:

    # January 13, 2013 at 12:39 am

    Oh nice. Does Hoefler have web fonts now?

    Also what exactly is base64 encoding in regards to fonts and such?

    # January 13, 2013 at 12:52 am

    @Rugg They’ve been working on them for quite some time which were released to a select few for beta testing. Mostly those who are “high profile” on the web. I hear they will be released pretty soon, though.

    I’m not knowledgeable on base64 but basically I think it just encrypts the URL.

    # January 13, 2013 at 12:54 am

    Ok thanks for all your incite. Looks like I have some catching up to do. Cheers

    # January 13, 2013 at 1:01 am

    Just came across this nice article (2009)…providing an overview of the discussion here.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed