On Tue, 2007-10-30 at 08:40 +0800, [EMAIL PROTECTED] wrote:
> By the way
> $ cat /tmp/test.html
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd";>
> 
> <html>
> <head>
>  <title>TEST</title>
>  <meta http-equiv="Content-Type" content=
>  "text/html; charset=utf-8">
> </head>
> 
> <body>
>  <p>
>  其他訴求,例如,工寮材
>  料放寬認定為鐵皮及烤漆板、
>  租地內灌溉水塔或水
>  池施設、租地內墳墓、</p>
> </body>
> </html>
> $ iceweasel file:///tmp/test.html &
> 
> definitely shows the difference, when done after toggling
> dpkg -i fontconfig-config_2.4.2-1.2_all.deb #good
> dpkg -i fontconfig-config_2.4.91-1_all.deb  #bad

Ah, problem found. Firefox is not using your locale when viewing this
page (I don't know why, that seems mean). In fact, it's asking for "en"
in this case. So, try

$ fc-match --sort "Sans Serif":lang=en

and what you'll find is that the Japanese font 'Sazanami Mincho' comes
before the Traditional Chinese font 'AR PL KaitiM Big5'. Now, this font
has a bitmap strike at pixel size 16 (and a few other sizes). Which is
why all of the other glyphs come out pixelated. However, the 寬 glyph
does not have a bitmap version. The glyph is supposed to be rasterized
from the outline into a bitmap, but the cairo library which is doing the
rasterization appears to have a bug (not yet tracked down) in doing
this.

I'm not entirely sure what the best fix is (aside from fixing cairo,
which I will do); it's not very nice of iceweasel to select a Japanese
font for your text, especially a Japanese font which gets misdrawn.

Probably what you should do is create
a /etc/fonts/conf.d/61-traditional.conf file that places the traditional
Chinese fonts ahead of the Japanese ones: 

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>AR PL SungtiL GB</family>
                        <family>AR PL Mingti2L Big5</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>AR PL KaitiM GB</family>
                        <family>AR PL KaitiM Big5</family>
                        <family>SimSun</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>AR PL KaitiM GB</family>
                        <family>AR PL KaitiM Big5</family>
                </prefer>
        </alias>
</fontconfig>

-- 
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to