Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12521 - fontconfig do hint Chinese fonts well (/etc/fonts/fonts.conf error)
Summary: fontconfig do hint Chinese fonts well (/etc/fonts/fonts.conf error)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: Normal major (vote)
Assignee: Martin Schlemmer (RETIRED)
Depends on:
Reported: 2002-12-21 08:25 UTC by Yi-Shin Li
Modified: 2005-10-31 17:27 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Yi-Shin Li 2002-12-21 08:25:28 UTC

My mozilla(w/ xft support) could hardly display 
Chinese truetype fonts when I went to
My other gtk application, gaim, was not able to 
render Chinese TTFs well neither. However, the
xfd did display them without problem. Those Chinese 
fonts, kaiu.ttf and mingliu.ttc, are copied from Win2K.

I finally figured out that is because my fontconfig-2.1
has disabled the CJK fonts hinting in /etc/fonts/fonts.conf.
By enabling the Chinese(zh) TTF hinting, both my mozilla
and gaim render the TTF beautifully. I do not know if Koren
or Japan TTFs have the same problem.

from /etc/fonts/fonts.conf:
	<match target="font">
		<test name="lang" compare="contains">
		<edit name="hinting" mode="assign">

Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2002-12-21 15:53:48 UTC
Nakano, can you confirm this for Japanese fonts please?
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-21 16:11:54 UTC
 We can't hint CJK fonts well, so turn off hinting for CJK fonts.

        <match target="font">
                <test name="lang" compare="contains">
                <edit name="hinting" mode="assign">
        <match target="font">
                <test name="lang" compare="contains">
                <edit name="hinting" mode="assign">
        <match target="font">
                <test name="lang" compare="contains">
                <edit name="hinting" mode="assign">


Looks like Keith and co turned it off by default ...
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2002-12-22 04:57:40 UTC
Seo, can you test Korean fonts please?
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-22 05:11:42 UTC
Btw, that page display fine here without editing fonts.conf ...
Comment 5 Jungmin Seo (RETIRED) gentoo-dev 2002-12-22 05:46:51 UTC
my korean ttf fonts work well without enabling the hinting feature, and your 
chinese fonts seem to have the correct hinting information with them, which is 
why they are better with enabling it.
Comment 6 Yi-Shin Li 2002-12-22 22:40:59 UTC
>Btw, that page display fine here without editing fonts.conf ...
maybe that is because we have different Chinese TTF configuration.
What is your font configuration? 

In my mozilla, the "Traditional Chinese Font" is "PMingLiU", 
which is copied from MSWin2K(mingliu.ttc). 
The followings are the screenshots that took from mozilla: with "zh" hinting (200% text room): without "zh" hinting (200% text room):

the Chinese Font configuration:
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-22 22:56:55 UTC
Didnt specify specific chinese fonts .. just let it use site specified ones
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-20 04:39:43 UTC
still an issue?
Comment 9 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-24 03:09:53 UTC
please test with latest fontconfig
Comment 10 Yi-Shin Li 2003-11-24 14:59:19 UTC
The Chinese Font Problem has been solved.

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22)
System uname: 2.4.22 i686 AMD Duron(tm) Processor
Gentoo Base System version
distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabd]
ccache version 2.3 [enabled]
CFLAGS="-mcpu=athlon -O2 -pipe"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/sha/config /var/bind /usr/X11R6/lib/X11/xkb /opt/tomcat/conf /usr/kde/3.1/share/cfig /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /r/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon -O2 -pipe"
FEATURES="sandbox ccache autoaddcvs"
USE="x86 apm foomaticdb libg++ mad mikmod pdflib xmms xv zlib gtkhtml gdbm berb slang readline tetex svga guile sdl gpm tcpd pam python imlib qt motif snmp r -sse 3dnow mmx kde gnome alsa bonobo -cups lprng mozilla truetype dvd jpeg g avi mpeg encode quicktime opengl directfb esd nls nas arts perl tcltk java crt xfs ssl mozsvg mozcalendar mozinterfaceinfo mozp3p mozxmlterm moznocompose o oggvorbis ncurses X libwww png gtk gtk2 lcms tiff xml2 -ldap mysql imap maild sasl postgres ofx hbci doc spell cjk"
Comment 11 Thomas Bettler 2005-10-31 17:27:08 UTC
You might close this bug, it's solved now!