[gimpwin-dev] Re: GTK+2.0 Chinese (or CJK) fonts on win32

 > astro_chuck writes:
 >  > Thanks tml, you are right, mingliu is a traditional. However it still
 >  > doesn't work after I put these lines in pango.aliases:
 >  > 
 >  > sans = sans
 >  > sans += "MingLiU"

I have now hacked on pangowin32 a bit, regained my understanding of
how it works (or fails to work), and I think I understand the issues
here. This definitely is related to LOGFONT::lfFaceName being in the
local codepage as described in bug #68113. I have added code that
looks for an ASCII (English) name (peeking into the font with
GetFontData()) instead (compare to FreeType2's sfobjs.c:tt_face_get_name()). 

While I am at it, I will also do some other improvements, optimisation
and refactoring as necessary. Hopefully, this will result in a
pangowin32 that is in a much better shape. I'll probably be done in a
few days, commit to CVS, and build new zipfiles of pango-1.0 to

I'll also look into making pango_win32_font_get_coverage() actually
use the PangoLanguage passed to it. Will check what FreeType2 does, if
it does something similar. It seems that you can use this heuristics:
If the font name table has an entry in Traditional Chinese (0x404), it
is for zh_TW. If it has a name in Simplified Chinese (0x804), it is
for zh_CN. By comparing to the PangoLanguage
pango_win32_font_get_coverage() is asked to get the coverage map for,
one can then decide whether to include the unified CJK characters or


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]