How to Programmatically Identify a PI Font (a Dingbat) under OS X

Posted by Glenn Howes on Stack Overflow See other posts from Stack Overflow or by Glenn Howes
Published on 2010-04-12T22:48:42Z Indexed on 2010/04/12 22:52 UTC
Read the original article Hit count: 293

Filed under:
|

There is a class of fonts called Pi fonts whose glyphs, under OS X, get mapped to the private Unicode space 0xF021-0xF0FF such that if you subtract 0xF000 from each unicode character to retrieve the 8-bit version of the character and be able to draw that character as if it were a standard Roman character.

My question is how do I recognize these fonts? It's obvious the system can do so because there is a category on the Special Characters palette called "Pi Fonts" which apparently has the various such fonts installed on my system. In my case they are BookshelSymbolSeven, MSReferenceSpeciality, MT-Extras, Marlett, MonotypeSorts, Webdings, and various Wingdings. If I use the old fashioned QuickDraw routines to ask for the TextEncoding of these fonts, I get a value of 0x20000 which I do not see in the system header file TextCommon.h. Am I supposed to treat any font with a TextEncoding of 0x20000 as a Pi Font? And I'd rather not use any QuickDraw font handling routines for obvious reasons.

© Stack Overflow or respective owner

Related posts about osx

Related posts about fonts