Treehouse: Grow your CSS skills. Land your dream job.

Detecting font smoothing

  • # October 25, 2011 at 1:34 pm

    I’ve been pouring over the Modernizr documentation but I don’t see anything in there about detecting font smoothing. Is anyone else dealing with this? Windows XP machines make nastiness out of a lot of [at]font-face fonts. So I’m trying to add a class to the HTML element the way Modernizr does in order to disable those fonts when smoothing is not available. I think I’m going with this method.


    # October 26, 2011 at 12:28 am

    I doubt I can help, but I would think you can detect the OS with JS or PHP and then use an if statement to link to your XP specific stylesheet, (similar to If IE) and have your backup fonts in it? I have no real clue though lol.

    # August 28, 2012 at 12:14 pm

    It’s been a long time ago, but I ended up putting some fantastically reliable PHP browser detection into all my themes. Now I make some assumptions about the OS from the browser. For example, if the browser is IE6 or IE7, I don’t do much of anything … not even the normal stylesheets. If the browser is IE8, I play it safe. The OS may or may not render the fonts the way I want so I use that condition to load a stylesheet that switches all the serif fonts to Georgia, or all the sans-serif fonts to Arial for example.

    It’s probably not right for everyone, but it’s right for me. If anyone is interested in seeing my boilerplate, let me know. I’m planning on going public with my WordPress theme Boilerplate once I improve it a little further.

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

You must be logged in to reply to this topic.