ClearType font smoothing question.

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • ClearType font smoothing question.


      I've been updating one of my tools for generating a texture map containing a font set for use in rendering in-game text as texture mapped quads. At the moment I am using atialiased font smoothing -- I'm passing in ANTIALIASED_QUALITY for the fdwQuality parameter in the CreateFont() Win32 API function. I am working under WinXP so I'd like to use ClearType font smoothing. Only problem is that ClearType only works for TrueType fonts and OpenType fonts containing TypeType outlines. The vast majority of fonts shipped with WinXP are OpenType. Is there a simple Win32 API function that will tell me if an OpenType font contains a TypeType outline?

    • RE: ClearType font smoothing question.

      I'm not sure - you'd probably have to check with whomever created the font file to see, or simply check the font visually. We ran into tons of stuff like that when choosing fonts for our casual games - but more recent APIs or even font toolkits might solve your problem.

      Have you tried google yet? It's my favorite for answering wacky questions like this. My search yielded a utility on the Microsoft Typography Site:

      I hope that is a useful thing - I didn't try it myself.
      Author, Programmer, Brewer, Patriot
    • Thanks for the link. I ended up allowing the user to select ClearType if he/she so wishes. The tool will try and use ClearType font smoothing. If the user doesn't like it or if ClearType font smoothing isn't available for the selected font then the user can always switch back to the default antialiased quality font smoothing -- the best of both worlds I guess :D