Hi,

I have been looking at XFONT_BuildMetrics and I'm looking for 
suggestions for fixing the problems with dbcs fonts. I'll use an 
example to illustrate the problem.

When we build the font metrics we simply grab the font values from
XFontStruct to define its attributes. So for example, daewoo-gothic
is a character cell font so we mark it as fixed pitch. So when an
application looks for fixed pitch fonts it will find daewoo-gothic.
But, daewoo-gothic is a dbcs font for charaset ksc5601. The font does 
not contain glyphs that map from ascii. To resolve ascii characters we
combine this font with an ascii font of the same height. This coupling 
is created in XFONT_RealizeFont when we select the font into the dc.
So this is done completely independent of XFONT_BuildMetrics.
The implication is that the ascii font we chose may not have the same
metrics as daewoo-gothic and as a consequence the metrics returned
to the application are incorrect. This coupling is transparent
to the application, as far as the application is concerned it's one
font.

perhaps we should be more restrictive when we match subfonts. If we 
are more restrictive it is not unlikely that we can't find a match. 
Any suggestions?

/Ulrich

Reply via email to