views:

61

answers:

2

How can I check if a weirdo character I'd like to use is included in the used font?

+2  A: 

Try using GetFontUnicodeRanges (from gdi32.dll), and then checking the GLYPHSET that is returned.

GetGlyphIndices is supposed to return 0xffff for non-existant glyphs (if called with the GGI_MARK_NONEXISTING_GLYPHS flag), but I've seen a report that it is broken, so you should probably avoid it.

Todd Owen
A: 

See this StackOverflow post which has some sample code. Note that the code as posted has a bug in it, my response to the question includes a fix.

FarmerDave