Bug 131714 - traditional Chinese font break in Firefox
Summary: traditional Chinese font break in Firefox
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: X11 Applications (show other bugs)
Version: Final
Hardware: i686 SuSE Linux 10.0
: P5 - None : Normal
Target Milestone: ---
Assignee: Mike Fabian
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-01 07:40 UTC by Haojie Lin
Modified: 2006-01-05 11:25 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
broken (90.07 KB, image/png)
2005-11-01 07:42 UTC, Haojie Lin
Details
Screenshot show the correct display in Firefox whit MingLiu font (76.22 KB, image/png)
2005-11-01 07:47 UTC, Haojie Lin
Details
mingliu-autohinter-pixelsize30.png (121.48 KB, image/png)
2006-01-04 10:17 UTC, Mike Fabian
Details
mingliu-bytecode-interpreter-pixelsize30.png (30.57 KB, image/png)
2006-01-04 10:19 UTC, Mike Fabian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Haojie Lin 2005-11-01 07:40:11 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
Comment 1 Haojie Lin 2005-11-01 07:42:24 UTC
Created attachment 56066 [details]
broken
Comment 2 Haojie Lin 2005-11-01 07:47:08 UTC
Created attachment 56067 [details]
Screenshot show the correct  display in Firefox whit MingLiu font
Comment 3 Wolfgang Rosenauer 2005-11-01 09:16:13 UTC
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.
Comment 4 Haojie Lin 2005-11-01 11:44:20 UTC
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.
Comment 5 Wolfgang Rosenauer 2005-11-01 11:50:42 UTC
thanks for testing.
Comment 6 Wolfgang Rosenauer 2005-11-24 19:26:27 UTC
Mike, Rob, I'm not sure how to find the problem. Any hints?
Comment 7 Robert O'Callahan 2005-11-28 23:11:05 UTC
Does it display in other GTK apps?
Comment 8 Haojie Lin 2005-12-01 15:51:55 UTC
Oh,Borken in Gedit too !
But,Just MingLiu font is borken,others are display well.





Comment 9 Haojie Lin 2005-12-01 16:09:35 UTC
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








Comment 10 Haojie Lin 2005-12-08 12:15:21 UTC
bug of Freetype2.1.10 
I turn off autohint and use hinting instead of.
Then MingLiu font display well.
Comment 11 Wolfgang Rosenauer 2005-12-08 15:47:47 UTC
Mike, so that's yours.
Comment 12 Mike Fabian 2006-01-04 10:17:17 UTC
Created attachment 61939 [details]
mingliu-autohinter-pixelsize30.png

MingLiu rendered with the autohinter (broken).

the command line used was

    xfd -fa "MingLiu:pixelsize=30"
Comment 13 Mike Fabian 2006-01-04 10:19:48 UTC
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.)
Comment 14 Mike Fabian 2006-01-04 10:35:57 UTC
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.

Comment 15 Zhe Su 2006-01-04 10:44:02 UTC
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.

Comment 16 Zhe Su 2006-01-04 10:46:51 UTC
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.
Comment 17 Mike Fabian 2006-01-04 10:48:32 UTC
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?

Comment 18 Zhe Su 2006-01-04 10:55:14 UTC
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.
Comment 19 Mike Fabian 2006-01-05 11:25:49 UTC
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.