Bug 589974 - cjkuni-uming-fonts .conf file breaks font lookup by lang
Summary: cjkuni-uming-fonts .conf file breaks font lookup by lang
Alias: None
Product: Fedora
Classification: Fedora
Component: cjkuni-fonts
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Caius Chance
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-07 12:44 UTC by Caolan McNamara
Modified: 2010-05-27 18:37 UTC (History)
8 users (show)

Fixed In Version: cjkuni-fonts-0.2.20080216.1-42.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-05-27 18:37:01 UTC
Type: ---

Attachments (Terms of Use)

Description Caolan McNamara 2010-05-07 12:44:53 UTC
Description of problem:
Once cjkuni-uming-fonts is installed fc-match :lang=zh-cn stops working. i.e. when querying for a font by zh-* language you get fonts that don't support those languages.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

1. start without any cjkuni-*-fonts installed
2. install some other zh supporting fonts, e.g. yum install wqy-zenhei-fonts
3. LANG=C fc-match ":lang=zh-cn"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
4. yum -y install cjkuni-uming-fonts
3. LANG=C fc-match ":lang=zh-cn"
DejaVuSans.ttf: "DejaVu Sans" "Book"
and that font does not support zh-cn
5. mv /etc/fonts/conf.d/64-ttf-arphic-uming.conf /tmp
6. LANG=C fc-match ":lang=zh-cn"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"

i.e. /etc/fonts/conf.d/64-ttf-arphic-uming.conf causes this, looking closer at it I see..

<test name="lang" compare="contains">
<edit name="family" mode="prepend" binding="strong">
  <string>Bitstream Vera Sans</string>
  <string>DejaVu Sans</string>
  <string>AR PL UMing HK</string>
  <string>AR PL UMing CN</string>

This looks bogus to me. prepend Bitstream and DejaVu to the list (if I'm reading this right) when the language is zh* ? Surely it should at least be...

<edit name="family" mode="prepend" binding="strong">
  <string>AR PL UMing HK</string>
  <string>AR PL UMing CN</string>

Doing that I get...

LANG=C fc-match ":lang=zh-cn"
uming.ttc: "AR PL UMing HK" "Light"

which makes a lot more sense.

Perhaps the .conf should also do more precise matching to suggest the HK variant for traditional zh language tags and the CN one for simplified zh language tags

Comment 1 Caolan McNamara 2010-05-07 12:47:41 UTC
caolanm->behdad: Am I right here ?

Comment 2 Jens Petersen 2010-05-21 04:04:48 UTC
This doesn't look so good: I think we need to investigate.

Comment 3 Akira TAGOH 2010-05-21 05:15:53 UTC
I should already pointed out that on the bug and the list Peng Wu posted about reorganizing Chinese fonts thing. actually those bogus rules are being dropped in the proposed configuration files - http://pwu.fedorapeople.org/fonts-conf/65-0-ttf-arphic-uming.conf

Peng Wu, that would be good time to push those updates.


Comment 4 Peng Wu 2010-05-24 05:59:51 UTC
Hi Akira TAGOH,
  I will push the updates for UMing/UKai and WQY soon. Thanks for the review.
  The next comment will describes the changes to UMing/UKai.

Comment 5 Peng Wu 2010-05-24 06:14:37 UTC
In Simplified Chinese (SC for short) and Traditional Chinese (TC for short), many characters has different writing styles, so it has better use different fonts for SC and TC.
In order to provides better fonts for SC and TC users, UMing will be the default font for TC, and ZenHei will be the default font for SC.

The purpose of this change is:
  1. When use Simplified Chinese locale to login Fedora gdm, all default desktop fonts will use WenQuanYi;
  2. When use Traditional Chinese locale to login Fedora gdm, all default desktop fonts will use UMing.

For cjkuni-fonts-uming:

The needed changes for cjkuni-fonts-uming is:
1. Please remove the following fontconfig files from cjkuni-fonts-uming: 35-ttf-arphic-uming-aliases.conf 41-ttf-arphic-uming.conf 64-ttf-arphic-uming.conf.
2. And add the 65-0-ttf-arphic-uming.conf to UMing fontconfig file.

For cjkuni-fonts-ukai:

The needed changes for cjkuni-fonts-ukai is:
1. Please remove the following fontconfig files from cjkuni-fonts-ukai:
35-ttf-arphic-ukai-aliases.conf 41-ttf-arphic-ukai.conf 75-ttf-arphic-ukai-select.conf.

I think most files removed is kept for legacy reason, if there are no explicit reason to keep them, will clean up these fontconfig files.

For more details and reasons, please see also README.en on http://pwu.fedorapeople.org/fonts-conf.

Comment 6 Fedora Update System 2010-05-27 07:27:10 UTC
cjkuni-fonts-0.2.20080216.1-42.fc13 has been submitted as an update for Fedora 13.

Comment 7 Fedora Update System 2010-05-27 18:36:48 UTC
cjkuni-fonts-0.2.20080216.1-42.fc13 has been pushed to the Fedora 13 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.