The Consolas font does not have Chinese glyphs in it. by Jeff_Relf
Jeff_Relf
Wed Oct 17 05:35:28 PDT 2007
Speaking of fonts... Contrary to what I had thought,
the Consolas font does not have Chinese glyphs in it.
The code I used to determine that goes kind of like this:
HDC DC ; Chk( TheCache->GetDC( & DC ) );
SetPtr( DC, Fnt ); // Try the Consolas font ( monospaced ).
short Good ; const int NoGlyph = 1 ;
// â?? * B â?? has a unicode character that needs caching.
GetGlyphIndices( DC, B, 1, & Good, GGI_MARK_NONEXISTING_GLYPHS );
if ( short( Good ) == -1 )
SetPtr( DC, SymFnt ); // Try the â?? MS Mincho â?? font.
GetGlyphIndices( DC, B, 1, & Good, GGI_MARK_NONEXISTING_GLYPHS );
if ( short( Good ) == -1 ) { // Give up, we don't have the font.
Chk( TheCache->ReleaseDC( DC ) ); return NoGlyph ; } }
// Code is from X.CPP in â?? www.Cotse.NET/users/jeffrelf/Games.ZIP â??.