Bugzilla – Bug 131714
traditional Chinese font break in Firefox
Last modified: 2006-01-05 11:25:49 UTC
As you can see in the screenshot,when use MingLiu to display traditional Chinese characters in Firefox,It is broken. MingLiu font can download form : http://download.microsoft.com/download/ie5/IME/5.02/W9XNT4/EN-US/tcmondo.exe then uses "cabextract" to extrack tcmondo.exe
Created attachment 56066 [details] broken
Created attachment 56067 [details] Screenshot show the correct display in Firefox whit MingLiu font
The working version is Firefox 1.5beta2 and the not working is the SUSE version of 1.0.x? Is the 1.5b2 version an original mozilla.org build or one of ours? For the upcoming Firefox 1.5 release we enabled Pango for font rendering so almost everything could have changed. So please test if Firefox from ftp://ftp.suse.com/pub/projects/mozilla/experimental/firefox/ works for you.
The working Firefox 1.5beta2 is in another distro (Arch linux),the correct one screenshot is get form my Arch Linux. The not working one is SUSE version of Firefox 1.0.7 I downloaded the Firefox 1.4.99 form the URL you posted and do a upgrade. Both SUSE version of Firefox 1.0.7 and 1.4.99 have some problem,font broken too. I guess this issue maybe cause by freetype2 or libXft.
thanks for testing.
Mike, Rob, I'm not sure how to find the problem. Any hints?
Does it display in other GTK apps?
Oh,Borken in Gedit too ! But,Just MingLiu font is borken,others are display well.
Screenshot of SUSE ,MingLiu font is broken,Founder display well http://img173.imageshack.us/img173/5751/ss14dt.png Screenshot, display well in other Distro http://img173.imageshack.us/img173/3803/ss22tf.png
bug of Freetype2.1.10 I turn off autohint and use hinting instead of. Then MingLiu font display well.
Mike, so that's yours.
Created attachment 61939 [details] mingliu-autohinter-pixelsize30.png MingLiu rendered with the autohinter (broken). the command line used was xfd -fa "MingLiu:pixelsize=30"
Created attachment 61940 [details] mingliu-bytecode-interpreter-pixelsize30.png MingLiu:pixelsize=30 rendered with the bytecode interpreter (by setting "autohint" to "false". This works only if the byte code interpreter is enabled when compiling freetype2, but the freetype2 package in SuSE Linux >= 10.0 has the byte code interpreter enabled.)
Haojie Lin> bug of Freetype2.1.10 Haojie Lin> I turn off autohint and use hinting instead of. Haojie Lin> Then MingLiu font display well. I guess this isn't really a bug of Freetype 2.1.10 (Adding Werner Lemberg, one of the freetype authors to the CC: to make sure). I heard long ago that there are a few CJK fonts which absolutely need the byte code interpreter because they cannot be rendered correctly without it. And I heard that this mainly affects fonts made by Dynalab. MingLiu is indeed made by Dynalab: mfabian@magellan:~$ fc-list MingLiu foundry family style MingLiU,細明體:style=Regular:foundry=dynalab mfabian@magellan:~$ MingLiU is the first font I found where I could reproduce this problem, the Japanese dynalab fonts I tested previously worked fine with the autohinter.
Yes, you are right. This font is a kind of composed ttf font, which stores components and the composing information of each glyphs rather than the actual glyphs. The finaly glyphs will be composed with components on-the-fly by hinting instructions. So such font can only be rendered correctly when the byte code interpreter is enabled and used. The autohint engine can't understand those hinting instructions to compose the glyphs at all, so you won't get correct result from autohint engine. IMO, for such kind of fonts, the only way to support them is adding special config rule in fonts.conf to turn on byte code interpreter for them.
The advantage of such kind of fonts is that the font size could be very small. I tested a similar font before, which contains more than 27000 glyphs but only has about 3M bytes size, while FZSongTi is about 17M.
Zhe Su> IMO, for such kind of fonts, the only way to support them is Zhe Su> adding special config rule in fonts.conf to turn on byte code Zhe Su> interpreter for them. Yes, I'll do that. Besides MingLiU and PMingLiU, do you know any other fonts which sould be added to the list of fonts where the byte code interpreter should always be used?
I don't know others for now. Because the rendering quality and performance are worse than ordinary ttf font, such kind of fonts are not widely used in China mainland, except in some embedded devices.
I added such a rule to /etc/fonts/suse-hinting.conf which is autogenerated by /usr/sbin/fonts-config (called by SuSEconfig --module fonts). Updated fonts-config package submitted to STABLE. Packages for testing for SuSE 10.0 are at ftp://ftp.suse.com/pub/projects/m17n/10.0/ You need both the new "fonts-config" package *and* the new "fontconfig" package from that directory. Closing as FIXED.