I have been using GetGlyphIndices to determine whether fonts contain the
special characters we use in our product. It has been working well enough
that I shipped the code in our latest service update. Low and behold,
several customers immediately report problems and when I investigate, I
discover that for some fonts GetGlyphIndices is returning a value other than
0xFFFF for characters that the fonts do not contain.
For example, GetGlyphIndices reports that MS San Serif contains a glyph at
index 0x1F for Unicode codepoints U235E, U2339,and U2352. Now I know for
certain that this font does not contain glyphs for these characters.
Can anyone explain why GetGlyphIndices is not returning 0xFFFF for these
codepoints? And, can anyone explain how I can determine when
GetGlyphIndices is giving me inaccurate information?
BTW I noticed that 0x1F is one less than 32 and so I thought maybe that the
glyph index was in some way connected with control characters. But, I tried
checking whether glyph indices were less than 32 or if they were less than
the glyph index of the tmFirstChar, but neither of these techniques works
with all fonts.
David Liebtag
IBM APL products and Services
Can anyone explain why GetGlyphIndices does not return 0xFFFF for codepoints
that are not in the MS Sans Serif and Courier fonts?
Thank you.
Feng Yuan [MSFT] http://blogs.msdn.com/fyuan
"Feng Yuan [MSFT]" <fy...@online.microsoft.com> wrote in message
news:%239Qtj4x...@TK2MSFTNGP02.phx.gbl...
My email to ntfont at microsoft.com came back user unknown. Any other
suggestions?
David Liebtag
"Feng Yuan [MSFT]" <fy...@online.microsoft.com> wrote in message
news:%239Qtj4x...@TK2MSFTNGP02.phx.gbl...
Try ntfonts at microsoft.com
If possible, could you post any explanation you get here in the newsgroup?
As I am also interested to know the cause.
--
Christoph Lindemann
Undocumented Printing
http://undocprint.printassociates.com/
"David Liebtag" <lie...@us.ibm.com> wrote in message
news:un1Yolzj...@TK2MSFTNGP05.phx.gbl...
1) ntfonts is not for customer support. So please do not use it.
2) This is a bug on bitmap fonts, so GDI is doing some simulation to make
the function work.
3) Workaround, use GetFontUnicodeRanges and compare each character to the
list of supported ranges.
Thanks
--
Thank you. GetFontUnicodeRanges does the trick.