? cjk-patch.diff Index: xap_UnixFont.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFont.cpp,v retrieving revision 1.55 diff -u -r1.55 xap_UnixFont.cpp --- xap_UnixFont.cpp 2001/04/18 17:59:05 1.55 +++ xap_UnixFont.cpp 2001/05/19 06:34:15 @@ -245,7 +245,8 @@ else { m_fontType = FONT_TYPE_UNKNOWN; - return false; + if(!m_is_cjk) /* cjk has different fonts.dir format. */ + return false; } return true; Index: xap_UnixFontManager.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFontManager.cpp,v retrieving revision 1.40 diff -u -r1.40 xap_UnixFontManager.cpp --- xap_UnixFontManager.cpp 2001/04/15 23:25:37 1.40 +++ xap_UnixFontManager.cpp 2001/05/19 06:34:16 @@ -479,6 +479,23 @@ void XAP_UnixFontManager::_allocateCJKFont(const char * line, int iLine) { + /* + Each line for cjk fonts.dir files comes in as: + + Song-Medium-GB-EUC-H, -default-song-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0, 880, 120, 1000 + + We consider everything up to the first comma to be the postscript + font name which we will use for postscript printing. + The second field is the XLFD of the font. The next 3 fields are + the ascent, descent and width of the font. + + FIXME: We might want to change the format of the file to having + the first field as the actually font filename. And insert the + postscript fontname to the 3rd field. This will agree better with + standard fonts.dir. Comma still has to be used as the seperator + since white spaces are valid XLFD characters. + */ + gchar **sa= g_strsplit(line,",",5); g_strstrip(sa[0]);