Bug 771093 - lang rule matches unexpected lang
Summary: lang rule matches unexpected lang
Alias: None
Product: Fedora
Classification: Fedora
Component: fontconfig
Version: 16
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-01-01 08:27 UTC by Yao Ziyuan
Modified: 2014-01-21 23:04 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-09-25 04:24:15 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
FreeDesktop.org 28958 None None None 2012-09-07 03:32:35 UTC

Description Yao Ziyuan 2012-01-01 08:27:11 UTC
Description of problem:

In Fedora 16, both "simplified-chinese-support" and "traditional-chinese-support" package groups are installed by default. The problem is, simplified Chinese web pages (e.g. www.sina.com.cn) as displayed in Firefox or Chrome will be rendered very fuzzily if "traditional-chinese-support" is installed. If we remove "traditional-chinese-support", simplified Chinese will be rendered significantly better. So something in "traditional-chinese-support" is affecting simplified Chinese rendering.

How reproducible:

Run the Fedora 16 Live CD (which has both "simplified-chinese-support" and "traditional-chinese-support" package groups installed by default), start Firefox, navigate to www.sina.com.cn. You'll see simplified Chinese characters on that web page is rendered very fuzzily. Removing the "traditional-chinese-support" package group will solve the problem.

Comment 1 Bill Nottingham 2012-09-07 01:02:36 UTC
Ideally, we should be able to have both TC and SC fonts installed without affecting things. Perhaps this can be fixed in the fontconfig configuration?

Comment 2 Akira TAGOH 2012-09-07 02:21:29 UTC
Yes. we could improve the configuration file in fonts packages and actually there are roughly two problems here.

1. cjkuni-ukai-fonts doesn't have the language specific rule. this would be the root cause on this issue. this should also affects all of releases, even rawhide.

2. as I filed so many bugs about malformed configuration, it's not yet fixed in f16 branch for cjkuni-uming-fonts (Bug#837523) and wqy-zenhei-fonts (Bug#837524). this may potentially causes a trouble in some cases.

So reassigning to cjkuni-ukai-fonts to fix it so far. also ping on those two bugs to update in f16 too.

Comment 3 Peng Wu 2012-09-07 03:13:20 UTC
Sorry, not reproducible.

Do you have some customization in ~/.fonts.conf.d or ~/.fonts.conf?

Comment 4 Akira TAGOH 2012-09-07 03:32:34 UTC
Okay, after further investigation, this would explains all:
$ FC_DEBUG=4 fc-match monospace:lang=zh-cn

FcConfigSubstitute test pattern any lang Equal "zh-hk"
FcConfigSubstitute test pattern any family Equal "monospace"
Substitute match
        pattern any lang Equal "zh-hk"
        pattern any family Equal "monospace"
        Edit family Prepend "AR PL UMing HK";

Prepend list before  "DejaVu Sans Mono"(w) "Bitstream Vera Sans Mono"(w) "DejaVu
 Sans Mono"(w) "Inconsolata"(w) "Andale Mono"(w) "Courier New"(w) "Cumberland AM
T"(w) "Luxi Mono"(w) "Nimbus Mono L"(w) "Courier"(w) "monospace"(s) "VL Gothic"(
Prepend list after  "DejaVu Sans Mono"(w) "Bitstream Vera Sans Mono"(w) "DejaVu 
Sans Mono"(w) "Inconsolata"(w) "Andale Mono"(w) "Courier New"(w) "Cumberland AMT
"(w) "Luxi Mono"(w) "Nimbus Mono L"(w) "Courier"(w) "AR PL UMing HK"(w) "monospa
ce"(s) "VL Gothic"(w)
FcConfigSubstitute editPattern has 2 elts (size 16)
        family: "DejaVu Sans Mono"(w) "Bitstream Vera Sans Mono"(w) "DejaVu Sans
 Mono"(w) "Inconsolata"(w) "Andale Mono"(w) "Courier New"(w) "Cumberland AMT"(w)
 "Luxi Mono"(w) "Nimbus Mono L"(w) "Courier"(w) "AR PL UMing HK"(w) "monospace"(
s) "VL Gothic"(w)
        lang: zh-cn(s)

After applying a backport patch:
$ fc-match monospace:lang=zh-cn
wqy-zenhei.ttc: "WenQuanYi Zen Hei Sharp" "Regular"

assigning back to fontconfig again.

Comment 5 Fedora Update System 2012-09-07 03:48:15 UTC
fontconfig-2.8.0-8.fc17 has been submitted as an update for Fedora 17.

Comment 6 Fedora Update System 2012-09-07 03:54:26 UTC
fontconfig-2.8.0-8.fc16 has been submitted as an update for Fedora 16.

Comment 7 Fedora Update System 2012-09-09 02:47:02 UTC
Package fontconfig-2.8.0-8.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fontconfig-2.8.0-8.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-09-25 04:24:15 UTC
fontconfig-2.8.0-8.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2012-09-25 04:32:16 UTC
fontconfig-2.8.0-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.