[Bug 244579] New: Font substitutions in Qt3 don't work anymore
https://bugzilla.novell.com/show_bug.cgi?id=244579 Summary: Font substitutions in Qt3 don't work anymore Product: openSUSE 10.3 Version: Alpha 0plus Platform: All OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: KDE AssignedTo: kde-maintainers@suse.de ReportedBy: mfabian@novell.com QAContact: qa@suse.de See also: http://lists.opensuse.org/opensuse-m17n/2007-02/msg00002.html -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #1 from mfabian@novell.com 2007-02-12 06:26 MST ------- Created an attachment (id=118589) --> (https://bugzilla.novell.com/attachment.cgi?id=118589&action=view) qt-fontsubstitution-verdana-fzmingtib.png -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |mfabian@novell.com ------- Comment #2 from dmueller@novell.com 2007-02-12 06:31 MST ------- I believe we've tried to make it use fontconfig substitutions. do those work? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #3 from mfabian@novell.com 2007-02-12 06:32 MST ------- In the screen shot in comment #1 you can see that “FZMingTiB” is defined as a replacement for “Verdana”. This information is saved to qtrc: mfabian@magellan:/tmp$ grep Verdana ~/.qt/qtrc Verdana=FZMingTiB font=Verdana,20,-1,5,50,0,0,0,0,0 mfabian@magellan:/tmp$ The entry line for the Sample Text can be edited and I have added the Chinese word 你好 there. Only the 好 is visible, the 你 is not. The reason is that the Japanese font IPAPGothic has been used: mfabian@magellan:/tmp$ grep fonts /proc/$(pidof qtconfig)/maps 2b233e8da000-2b233eb9c000 r--p 00000000 03:01 1101533 /usr/share/fonts/truetype/ipagp.ttf 2b233ebc2000-2b233ebf0000 r--p 00000000 03:02 1128672 /local/fonts/vista/verdana.ttf 2b2344c0c000-2b2344c32000 r--p 00000000 03:02 1128673 /local/fonts/vista/verdanab.ttf mfabian@magellan:/tmp$ I.e. the substitution rule to used “FZMingTiB” for Glyphs not in Verdana has been ignored. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #4 from mfabian@novell.com 2007-02-12 06:37 MST ------- I tried this in ja_JP.UTF-8 locale: mfabian@magellan:/tmp$ locale LANG=ja_JP.UTF-8 LC_CTYPE="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL= mfabian@magellan:/tmp$ When I try with LC_CTYPE=zh_TW.UTF-8: mfabian@magellan:/tmp$ LC_CTYPE=zh_TW.UTF-8 locale LANG=ja_JP.UTF-8 LC_CTYPE=zh_TW.UTF-8 LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL= mfabian@magellan:/tmp$ I get the result as in the screen shot I'll attach next. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #5 from mfabian@novell.com 2007-02-12 06:40 MST ------- Created an attachment (id=118593) --> (https://bugzilla.novell.com/attachment.cgi?id=118593&action=view) qt-fontsubstitution-verdana-fzmingtib-lc-ctype-zh-tw.png LC_CTYPE=zh_TW.UTF-8 /usr/lib/qt3/bin/qtconfig (LANG=ja_JP.UTF-8, all other LC_* unset). In the “maps” file you can see that now FZMingTiB is used: mfabian@magellan:/tmp$ grep fonts /proc/$(pidof qtconfig)/maps 2add738c3000-2add743f2000 r--p 00000000 03:01 1101659 /usr/share/fonts/truetype/FZMingTiB.ttf 2add7445c000-2add7448a000 r--p 00000000 03:02 1128672 /local/fonts/vista/verdana.ttf 2add7a52c000-2add7a552000 r--p 00000000 03:02 1128673 /local/fonts/vista/verdanab.ttf 2add7a552000-2add7acc7000 r--p 00000000 03:02 1128579 /local/fonts/vista/meiryo.ttc mfabian@magellan:/tmp$ There is a Japanese font (“Meiryo”) in the “maps” file as well. But the font visible in the “Sample Text” line is obviously “FZMingTiB”, not “Meiryo”. This is easy to see because “Meiryo” is a sans-serif font and “FZMingTiB” is a serif font. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 mfabian@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|mfabian@novell.com | ------- Comment #6 from mfabian@novell.com 2007-02-12 06:43 MST ------- Dirk Müller> I believe we've tried to make it use fontconfig Dirk Müller> substitutions. do those work? No, apparently these do no work either. In the screen shot in comment #5, “FZMingTiB” has been used (which is not bad, it is a nice traditional Chinese font), but the default font selected by fontconfig for zh-TW would have been “CMEXSong” on my system: mfabian@magellan:/tmp$ LC_CTYPE=zh_TW.UTF-8 fc-match sans cmexsong.ttf: "CMEXSong" "Regular" mfabian@magellan:/tmp$ locale -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #7 from mfabian@novell.com 2007-02-12 07:09 MST ------- Created an attachment (id=118598) --> (https://bugzilla.novell.com/attachment.cgi?id=118598&action=view) qt-fontsubstitution-verdana-fzmingtib-lc-ctype-zh-tw-cmexsong.png As can be seen in the screen shot attached here, the fontconfig default font for zh-TW which is “CMEXSong” (aka “CMEX標宋”) cannot be used even if one tries to set it up in the substitutions. mfabian@magellan:/tmp$ LC_CTYPE=zh_TW.UTF-8 fc-match sans cmexsong.ttf: "CMEXSong" "Regular" mfabian@magellan:/tmp$ fc-list "CMEXSong" CMEXSong,CMEX標宋:style=Regular mfabian@magellan:/tmp$ You can see here that “FZMingTiB” is used instead: mfabian@magellan:/tmp$ grep fonts /proc/$(pidof qtconfig)/maps 2ac3cfc4b000-2ac3d077a000 r--p 00000000 03:01 1101659 /usr/share/fonts/truetype/FZMingTiB.ttf 2ac3d07e4000-2ac3d0812000 r--p 00000000 03:02 1128672 /local/fonts/vista/verdana.ttf 2ac3d68b4000-2ac3d68da000 r--p 00000000 03:02 1128673 /local/fonts/vista/verdanab.ttf 2ac3d68da000-2ac3d704f000 r--p 00000000 03:02 1128579 /local/fonts/vista/meiryo.ttc mfabian@magellan:/tmp$ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #8 from mfabian@novell.com 2007-02-12 07:10 MST ------- Comment #7 might lead one to think that the substitutions setup in qtconfig have no effect at all. Alas it isn't so, they can have an effect in some cases. See next screen shot. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #9 from mfabian@novell.com 2007-02-12 07:40 MST ------- Created an attachment (id=118609) --> (https://bugzilla.novell.com/attachment.cgi?id=118609&action=view) qt-fontsubstitution-verdana-lc-ctype-zh-tw-fzkaitib-translated.png Here you can see that “FZKaiTiB” is used if it is specified as a substitution for Verdana, but *only* if the translated name “方正楷體” is used, if the English name “FZKaiTiB” is used this does *not* work. That Qt3/KDE3 has problems with translated font names is another bug, whether translated font names work in Qt3/KDE3 or not depends on the locale used. That is not good. mfabian@magellan:/tmp$ grep Verdana ~/.qt/qtrc Verdana=方正楷體^e font=Verdana,20,-1,5,50,0,0,0,0,0 mfabian@magellan:/tmp$ fc-list : | grep FZKaiTiB FZKaiTiB,方正楷體:style=Regular mfabian@magellan:/tmp$ grep fonts /proc/$(pidof qtconfig)/maps 2ae77738e000-2ae778216000 r--p 00000000 03:01 1101585 /usr/share/fonts/truetype/FZKaiTiB.ttf 2ae778280000-2ae7782ae000 r--p 00000000 03:02 1128672 /local/fonts/vista/verdana.ttf 2ae77e350000-2ae77e376000 r--p 00000000 03:02 1128673 /local/fonts/vista/verdanab.ttf 2ae77e376000-2ae77eaeb000 r--p 00000000 03:02 1128579 /local/fonts/vista/meiryo.ttc mfabian@magellan:/tmp$ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #10 from mfabian@novell.com 2007-02-12 07:51 MST ------- Created an attachment (id=118612) --> (https://bugzilla.novell.com/attachment.cgi?id=118612&action=view) qt-fontsubstitution-verdana-lc-ctype-zh-tw-fzkaitib-english.png Here you can see that it doesn't work if the English name “FZKaiTiB” is used in the substitution rule instead of the translated name “方正楷體”. mfabian@magellan:/tmp$ grep fonts /proc/$(pidof qtconfig)/maps 2aced74f2000-2aced8021000 r--p 00000000 03:01 1101659 /usr/share/fonts/truetype/FZMingTiB.ttf 2aced808b000-2aced80b9000 r--p 00000000 03:02 1128672 /local/fonts/vista/verdana.ttf 2acede15b000-2acede181000 r--p 00000000 03:02 1128673 /local/fonts/vista/verdanab.ttf 2acede181000-2acede8f6000 r--p 00000000 03:02 1128579 /local/fonts/vista/meiryo.ttc mfabian@magellan:/tmp$ grep Verdana ~/.qt/qtrc Verdana=FZKaiTiB^e font=Verdana,20,-1,5,50,0,0,0,0,0 mfabian@magellan:/tmp$ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #11 from mfabian@novell.com 2007-02-12 08:09 MST ------- I checked in qt-x11-free-3.3.7/src/kernel/qfontdatabase.cpp whether CMEXSong has all the glyphs required for traditional Chinese. qfontdatabase.cpp line 588 ff: // Han_Japanese { 0x4e00, 0x25EF, 0x3012, 0x3013, 0x30FB, 0x5CE0, 0xFF66, 0 }, // Han_SimplifiedChinese, 0x3400 is optional { 0x4e00, 0x201C, 0x3002, 0x6237, 0x9555, 0xFFE5, 0 }, // Han_TraditionalChinese, 0xF6B1 is optional // OR Han_HongkongChinese, 0x3435, 0xE000, 0xF6B1 are optional { 0x4e00, 0x201C, 0x3002, 0x6236, 0x9F98, 0xFFE5, 0 }, // Han_Korean { 0x4e00, 0 } // Taiwan would be 0x201C, 0x3002, 0x4E00, 0x9F98, 0xFFE5 }; CMEXSong has all of 0x4e00, 0x201C, 0x3002, 0x6236, 0x9F98, 0xFFE5, therefore I see no reason why Qt3 refuses to used that. Even if there are no font substitutions defined using this font, it should already be used by default in LC_CTYPE=zh_TW.UTF-8 because it is the default in fontconfig for that locale. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #13 from mfabian@novell.com 2007-03-07 08:14 MST ------- Created an attachment (id=122968) --> (https://bugzilla.novell.com/attachment.cgi?id=122968&action=view) fontbug.cpp Small testprogram which can be compiled with Qt3 or Qt4 to find out which font is used for “Sans Serif”. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kde-maintainers@suse.de |mfabian@novell.com ------- Comment #14 from dmueller@novell.com 2007-03-12 07:35 MST ------- coolo has a patch for fontconfig -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #15 from coolo@novell.com 2007-03-12 07:39 MST ------- please fix fontconfig first (and please check if SLE is affected): ~coolo/packages/fontconfig/fix-pattern-duplicate.diff -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #16 from mfabian@novell.com 2007-03-12 09:14 MST ------- Qt3: The patch seen to have no effect whatsoever. Qt4: The patch helps if the selected font is "Sans Serif", in that case the correct Chinese font is used. But if the font selected is not "Sans Serif", for example some font which does not support Chinese like "DejaVu Sans", this font is not used at all, only the default sans-serif font for Chinese is used in that case. I.e. there is no difference to the case when "Sans Serif" was requested in the application. But of course there should be a difference: If the application requests "DejaVu Sans", this font should be used for all glyphs it supports. Only for glyphs not supported by this font, for example Chinese, Qt should use fallback fonts. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #17 from mfabian@novell.com 2007-03-12 10:22 MST ------- Stephan Kulow> please check if SLE is affected The fontconfig 2.3.94 in SLES has the same problem in FcPatternDuplicate (). But as fixing that doesn't help at all for Qt3 and only fixes part of the problem in Qt4 (which isn't even included in SLES), I think fixing this in fontconfig 2.3.94 on SLES is rather useless. I think we should update to fontconfig 2.4.2 for SLES10-SP2 anyway, i.e. if there is no urgent problem in fontconfig 2.3.94 which needs to be solved before SP2, we should not touch it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #18 from coolo@novell.com 2007-03-13 02:20 MST ------- I see. It's just that PatternDuplicate is used by several other toolkits as google showed me, so there might be some risk. But let's blame that reason for updating to 2.4.2 later :) I don't understand why someone should set "Dejavu sans" in a chinese locale. Can you explain? Or is this an academical example? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #20 from coolo@novell.com 2007-03-13 02:46 MST ------- This should take care of the dejavu problem. Index: src/gui/text/qfontdatabase_x11.cpp =================================================================== --- src/gui/text/qfontdatabase_x11.cpp (revision 641779) +++ src/gui/text/qfontdatabase_x11.cpp (working copy) @@ -1484,7 +1484,7 @@ if (!family.isEmpty()) { QByteArray cs = family.toUtf8(); value.u.s = (const FcChar8 *)cs.data(); - FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue); + FcPatternAdd(pattern, FC_FAMILY, value, FcTrue); } if (i == 0) { ::match(script, request, family, foundry, -1, &desc); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 coolo@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|mfabian@novell.com |dmueller@novell.com ------- Comment #21 from coolo@novell.com 2007-03-13 02:54 MST ------- (reported to qt-bugs) Reassigning to Dirk for updating the 10.3 qt4 package -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |mfabian@novell.com ------- Comment #22 from dmueller@novell.com 2007-03-13 03:26 MST ------- done. that leaves us with the qt3 bugs, right? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #23 from mfabian@novell.com 2007-03-13 03:50 MST ------- Stephan Kulow> I don't understand why someone should set "Dejavu sans" Stephan Kulow> in a chinese locale. Can you explain? Or is this an Stephan Kulow> academical example? No, it is not an academic example at all. Many Chinese fonts have ugly or even incomplete Latin glyphs. I.e. it often looks much nicer to use a good Latin font (like DejaVu) for the Latin glyphs and use the Chinese font only for the Chinese glyphs. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #24 from dmueller@novell.com 2007-03-13 05:18 MST ------- --- kernel/qfontdatabase_x11.cpp (revision 636585) +++ kernel/qfontdatabase_x11.cpp (working copy) @@ -1814,6 +1814,7 @@ static QFontEngine *loadFontConfigFont(c #endif FcConfigSubstitute(0, pattern, FcMatchPattern); + FcDefaultSubstitute(pattern); // qDebug("1: pattern contains:"); // FcPatternPrint(pattern); this fixes the qt3 font selection issues. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #25 from dmueller@novell.com 2007-03-14 11:08 MST ------- together with the patch above parts of the "fix-chinese-font-detection" patch, that was introduced in bug 59059 needs to be reverted. FcCharSetAddChar(cs, 0xE000); FcCharSetAddChar(cs, 0xF6B1); it seems trolltech has got several bugreports about chinese and 3.3.8 and are now looking into it as well. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #26 from mfabian@novell.com 2007-03-14 11:24 MST ------- Thank you for investigating this! In bug #59059, Zhe Su wrote these glyphs are "optional". I'm not sure what he meant by "optional" but requiring glyphs from the Private Use Area of Unicode seems to be completely wrong. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Info Provider|mfabian@novell.com | Resolution| |FIXED ------- Comment #27 from dmueller@novell.com 2007-03-16 11:15 MST ------- considered fixed for qt4/3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #28 from mfabian@novell.com 2007-03-22 08:53 MST ------- With the latest updated qt3 package, I still see a strange problem with Japanese. Using my test program attached to comment #13 with "DejaVu Sans Mono" with a test string containing Japanese and running in a ja_JP.UTF-8 locale I get: mfabian@magellan:~/cpp/fontbug$ locale LANG=ja_JP.UTF-8 LC_CTYPE="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL= mfabian@magellan:~/cpp/fontbug$ fc-match sans meiryo.ttc: "Meiryo" "Normal" mfabian@magellan:~/cpp/fontbug$ I.e. "Meiryo" is the default font for Japanese on my system. But without using font substitutions at all in ~/.qt/qtrc I do not get Meiryo for the Japanese glyphs, I get “MS Gothic” instead: mfabian@magellan:~/cpp/fontbug$ ./fontbug & [1] 13776 mfabian@magellan:~/cpp/fontbug$ grep fonts /proc/$(pidof fontbug)/maps 2ba35d570000-2ba35de1b000 r--p 00000000 03:02 1128589 /local/fonts/vista/msgothic.ttc 2ba35de70000-2ba35deb0000 r--p 00000000 03:01 1101133 /usr/share/fonts/truetype/DejaVuSansMono.ttf mfabian@magellan:~/cpp/fontbug$ If I add a font substitution rule to try “Meiryo” first when DejaVu Sans Mono is lacking glyphs: mfabian@magellan:~/cpp/fontbug$ grep -C 1 DejaVu ~/.qt/qtrc [Font Substitutions] DejaVu Sans Mono=メイリオ^eMeiryo^e arial=helvetica^e mfabian@magellan:~/cpp/fontbug$ then the test program does indeed use “Meiryo” for the Japanese glyphs. I.e. the font substitutions work but without them the fallback font for Japanese is chosen strangely. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #29 from mfabian@novell.com 2007-03-22 08:55 MST ------- Created an attachment (id=125977) --> (https://bugzilla.novell.com/attachment.cgi?id=125977&action=view) fontbug.cpp New version of test program. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #30 from coolo@novell.com 2007-03-22 09:36 MST ------- if it works fine for qt4, we'll leave it as it is. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #31 from mfabian@novell.com 2007-03-22 10:07 MST ------- Actually it is even worse for Qt4, it uses the Chinese font CMEXSong as a fallback from “DejaVu Mono Sans” for Japanese glyphs when running in ja_JP.UTF-8 locale with no font substitutions configured in /usr/bin/qtconfig. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | Summary|Font substitutions in Qt3 |Qt4/Qt3 strange font selection in asiatic |don't work anymore |locales ------- Comment #32 from dmueller@novell.com 2007-03-23 09:46 MST ------- lets look further -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 ------- Comment #33 from mfabian@novell.com 2007-03-23 10:40 MST ------- Sorry, I did not interprete my test for qt3 in comment #28 correctly. “Meiryo” is the default font for Japanese for sans mfabian@magellan:~/cpp/fontbug$ fc-match sans meiryo.ttc: "Meiryo" "Normal" mfabian@magellan:~/cpp/fontbug$ *but* “MS Gothic” is the default font for Japanese for monospace: mfabian@magellan:~/cpp/fontbug$ fc-match monospace msgothic.ttc: "MS Gothic" "Regular" mfabian@magellan:~/cpp/fontbug$ (Japanese locale). And, “ mfabian@magellan:~/cpp/fontbug$ fc-match monospace msgothic.ttc: "MS Gothic" "Regular" mfabian@magellan:~/cpp/fontbug$ (Japanese locale). And, “ mfabian@magellan:~/cpp/fontbug$ fc-match monospace msgothic.ttc: "MS Gothic" "Regular" mfabian@magellan:~/cpp/fontbug$ (Japanese locale). And, “DejaVu Sans Mono” is marked as monospace in /etc/fonts/conf.d/40-generic.conf: <!-- Monospace faces --> <alias> <family>Bitstream Vera Sans Mono</family> <family>DejaVu Sans Mono</family> <family>Courier</family> <family>Courier New</family> <family>Andale Mono</family> <family>Luxi Mono</family> <family>Cumberland AMT</family> <family>Nimbus Mono L</family> <family>NSimSun</family> <family>FreeMono</family> <default><family>monospace</family></default> </alias> That means “MS Gothic” is the correct fallback font in that case. The current qt3 behaviour is completely correct here. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579 mfabian@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #34 from mfabian@novell.com 2007-03-23 10:46 MST ------- And the qt4 case works correctly as well. I could not reproduce the problem again which I reported in comment #31, I don't get CMEXSong any more but the correct “MS Gothic” instead. I don't know what I did wrong when testing this. I have updated to STABLE again yesterday, maybe there was a problem with the fontconfig caches which was fixed by the SuSEconfig run after the update? Anyway, everything seems to be OK now. Sorry for the extra confusion. Closing as FIXED again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=244579
Dirk Mueller
participants (1)
-
bugzilla_noreply@novell.com