Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetGlyphIndices returns index when font does not contain glyph for character

119 views
Skip to first unread message

David Liebtag

unread,
Jun 8, 2006, 5:56:20 PM6/8/06
to
Help!!!

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


David Liebtag

unread,
Jun 13, 2006, 2:54:59 PM6/13/06
to
Second request for help.

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]

unread,
Jun 13, 2006, 3:18:22 PM6/13/06
to
Send an email to ntfont at microsoft.com. Please give more details about OS
version.

Feng Yuan [MSFT] http://blogs.msdn.com/fyuan

David Liebtag

unread,
Jun 13, 2006, 6:23:20 PM6/13/06
to
Done. Thanks.

"Feng Yuan [MSFT]" <fy...@online.microsoft.com> wrote in message
news:%239Qtj4x...@TK2MSFTNGP02.phx.gbl...

David Liebtag

unread,
Jun 13, 2006, 6:33:26 PM6/13/06
to
Feng Yuan,

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...

Feng Yuan [MSFT]

unread,
Jun 13, 2006, 8:56:07 PM6/13/06
to
Sorry.

Try ntfonts at microsoft.com

Christoph Lindemann

unread,
Jun 14, 2006, 4:25:07 AM6/14/06
to
Hi David,

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...

Feng Yuan [MSFT]

unread,
Jun 14, 2006, 9:14:10 PM6/14/06
to
Got answers:

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

--

David Liebtag

unread,
Jun 15, 2006, 1:49:45 AM6/15/06
to
Feng Yuan,

Thank you. GetFontUnicodeRanges does the trick.

0 new messages