Bug 578051 - lang-specific overrides rule doesn't work as expected
lang-specific overrides rule doesn't work as expected
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: wqy-zenhei-fonts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Peng Wu
Fedora Extras Quality Assurance
:
Depends On: 578015
Blocks: F13Target
  Show dependency treegraph
 
Reported: 2010-03-30 00:00 EDT by Akira TAGOH
Modified: 2010-05-03 22:20 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-03 22:20:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Akira TAGOH 2010-03-30 00:00:37 EDT
Description of problem:
All of detailed information is available on my post at the fonts list:
http://lists.fedoraproject.org/pipermail/fonts/2010-March/001117.html

binding="same" in the fontconfig config file prevents to apply the rule for the
specific
language only properly. As a result, fonts is used for non-targetted languages
and it may gives different look and feel in some cases.

I'd propose to get rid of binding="same" from:
 65-wqy-zenhei.conf
Comment 1 Peng Wu 2010-04-06 22:32:43 EDT
I tested the changes on Fedora 13, and the result is as following:
(font config file is from http://pwu.fedorapeople.org/fonts-conf/).

1. Before removing binding="same" or binding="strong":
+ fc-match sans
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "中等"
+ fc-match sans:lang=zh
DejaVuSans.ttf: "DejaVu Sans" "Book"
+ fc-match sans:lang=zh-cn
DejaVuSans.ttf: "DejaVu Sans" "Book"
+ fc-match sans:lang=zh-tw
DejaVuSans.ttf: "DejaVu Sans" "Book"
+ fc-match sans:lang=zh-hk
DejaVuSans.ttf: "DejaVu Sans" "Book"
+ fc-match sans:lang=en
DejaVuSans.ttf: "DejaVu Sans" "Book"
+ fc-match sans:lang=en-us
DejaVuSans.ttf: "DejaVu Sans" "Book"

2. After removing binding="same" or binding="strong":
+ fc-match sans
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "中等"
+ fc-match sans:lang=zh
uming.ttc: "AR PL UMing TW" "Light"
+ fc-match sans:lang=zh-cn
uming.ttc: "AR PL UMing TW" "Light"
+ fc-match sans:lang=zh-tw
uming.ttc: "AR PL UMing TW" "Light"
+ fc-match sans:lang=zh-hk
uming.ttc: "AR PL UMing TW" "Light"
+ fc-match sans:lang=en
DejaVuSans.ttf: "DejaVu Sans" "Book"
+ fc-match sans:lang=en-us
DejaVuSans.ttf: "DejaVu Sans" "Book"

It seems that removing the binding="same" helps split between English and Chinese fonts.
Comment 2 Qianqian Fang 2010-04-07 14:02:03 EDT
similar to Bug#568613, I am taking myself off and let Peng to handle these bugs.
Comment 3 Peng Wu 2010-04-19 02:14:30 EDT
Fixed in wqy-zenhei-fonts-0.9.45-2.fc13.
Comment 4 Fedora Update System 2010-04-19 02:34:22 EDT
wqy-zenhei-fonts-0.9.45-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/wqy-zenhei-fonts-0.9.45-2.fc13
Comment 5 Fedora Update System 2010-04-20 09:13:27 EDT
wqy-zenhei-fonts-0.9.45-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update wqy-zenhei-fonts'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/wqy-zenhei-fonts-0.9.45-2.fc13
Comment 6 Akira TAGOH 2010-04-26 01:50:59 EDT
Testing result:
# rpm -qa wqy-zenhei-fonts
wqy-zenhei-fonts-0.9.45-2.fc13.noarch
# fc-match monospace:lang=en
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
# fc-match monospace:lang=en-us
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
# fc-match monospace:lang=zh
wqy-microhei.ttc: "WenQuanYi Micro Hei" "Regular"
# fc-match monospace:lang=zh-cn
wqy-zenhei.ttc: "文泉驛正黑" "Regular"
# fc-match monospace:lang=zh-hk
hanazono.ttf: "HanaMin" "Regular"
# fc-match monospace:lang=zh-sg
wqy-zenhei.ttc: "文泉驛正黑" "Regular"
# fc-match monospace:lang=zh-tw
hanazono.ttf: "HanaMin" "Regular"

Though the above result looks good, this isn't by 65-wqy-zenhei.conf. but by the implicit rules in fontconfig that happens on when no appropriate fonts matched by the rules. so

  <test name="lang">
    <string>zh</string>
  </test>

  should be:

  <test name="lang">
    <string>zh-cn</string>
    <string>zh-sg</string>
  </test>

# fc-match sans:lang=en
DejaVuSans.ttf: "DejaVu Sans" "Book"
# fc-match sans:lang=en-us
DejaVuSans.ttf: "DejaVu Sans" "Book"
# fc-match sans:lang=zh
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match sans:lang=zh-cn
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match sans:lang=zh-hk
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match sans:lang=zh-sg
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match sans:lang=zh-tw
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"

I'd add same comment above for this one as well. also that would be good to rename 65-wqy-zenhei.conf to 65-0- or something like that to apply this prior to 65-nonlatin.conf.

# fc-match serif:lang=en
DejaVuSerif.ttf: "DejaVu Serif" "Book"
# fc-match serif:lang=en-us
DejaVuSerif.ttf: "DejaVu Serif" "Book"
# fc-match serif:lang=zh
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match serif:lang=zh-cn
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match serif:lang=zh-hk
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match serif:lang=zh-sg
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
# fc-match serif:lang=zh-tw
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"

No explicit rules for serif in wqy-zenhei-fonts. this would be a kind of side-effect of 65-nonlatin.conf.

# for i in $(ls /usr/share/locale|grep -v -E "^(zh)$"); do fc-match sans:lang=$i|grep -E "^(WenQuanYi Zen Hei)$"; [ $? = 0 ] && echo $i; done
#

No affects to other languages.

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