Awful generic selection for zh in Firefox

Bug #1595414 reported by Mingye Wang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fonts-arphic-ukai (Ubuntu)
Expired
Wishlist
Unassigned
fonts-arphic-uming (Ubuntu)
Expired
Wishlist
Unassigned
language-selector (Ubuntu)
Expired
Wishlist
Unassigned

Bug Description

In https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/fonts-arphic-ukai/wily/revision/6, UMing and UKai are set as generics for fonts. However, this set of generics is completely intolerable -- setting UKai as a generic is like setting Zapfino and/or Comic Sans as a system-wise generic, while UMing as a normal (just a bit thin) serif sounds a bit better. This yields terrible results on non-Chinese systems with non-Chinese lang-attributed websites, like Twitter, on Ubuntu 14.04 LTS after installing Chinese language support which includes the two arphic fonts mentioned in this report.

This problem is similar to https://bugs.freedesktop.org/show_bug.cgi?id=20911, a long-standing system-global fontconfig non-latin fallback problem. See also bug #1560548 where these generic settings are considered as 'redundant' and proposed for deletion. I have mentioned a third-person report about such selection in #1560548 previously, but I have just reproduced this bug by myself by installing zh-cn support by mistake.

Mingye Wang (artoria2e5)
description: updated
description: updated
description: updated
Mingye Wang (artoria2e5)
summary: - Awful Generic Selection for CJK
+ Awful system-wise generic selection for CJK
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote : Re: Awful system-wise generic selection for CJK

Hi Mingye,

Trying to understand the issue.

In Ubuntu 14.04 the fonts-droid package is installed by default for everyone, and also part of the Chinese language support. Droid Sans Fallback should be the default font for Chinese web contents as far as fontconfig is concerned.

$ lsb_release -ds
Ubuntu 14.04.4 LTS
$ LC_CTYPE=en_US.UTF-8 fc-match -s | head
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
n019003l.pfb: "Nimbus Sans L" "Regular"
Waree.ttf: "Waree" "Book"
DroidSansFallbackFull.ttf: "Droid Sans Fallback" "Regular"
ukai.ttc: "AR PL UKai CN" "Book"
ukai.ttc: "AR PL UKai HK" "Book"
uming.ttc: "AR PL UMing CN" "Light"

Is this possibly another Chromium/Chrome specific issue?

Revision history for this message
Mingye Wang (artoria2e5) wrote :

Well, I am using Firefox, Firefox 47.0+build3-0ubuntu0.14.04.1.

With UKai installed, as far as I can retell, some of the Chinese content (usernames in Twitter notifications) are still displayed in Droid Sans, while tweet bodies are mostly displayed in UKai. I have just did some extra 'inspect element' work on these differences, and found that Twitter actually applies results of its own language detection on tweet bodies as html 'lang' attributes. Many Simplified Chinese text tend to be recognized as Japanese, so I am able to show you matching results from different languages.

ja: good (mis-recognized zh text)
en: good (Twitter UI)
zh: UKai

`LC_ALL=zh_CN.UTF-8 fc-match -a 'Sans' | head` shows UKai CN in the fourth place following Droid Sans Fallback, UMing CN and UMing HK, so yeah it sounds like a Firefox....... (But are there any good browsers left?)

Revision history for this message
Mingye Wang (artoria2e5) wrote :

My current suggestion is to construct a test HTML like this:

<!DOCTYPE HTML>
<html lang="en">
<head>
<title>UKai/UMing test</title>
<meta charset="UTF-8">
</head>
<body>
<style spellcheck="false" contenteditable="true" style="font-family: monospace; display: block; white-space: pre;">/* Change the needle font here */
body { font-family: sans-serif; }
</style>
<ul>
<li lang="zh">漢字汉字 @ zh</li>
<li lang="ja">漢字汉字 @ ja</li>
<li lang="en">漢字汉字 @ en</li>
</ul></body></html>

After removing UKai from my system, it begins to show UMing.

* * *

> as far as I can retell,

should be "recall". Well since I re-installed these troublemakers to write the other half of the report, just pretend that these words don't exist (I verified these observations.)

Revision history for this message
Mingye Wang (artoria2e5) wrote :

Just an uninteresting side note, setting font-family to either 'Monospace' or monospace in the test case above shows a very proportional font for ja. This should be a separate report, but just in case I forget:

$ LC_ALL='ja_JP.UTF-8' fc-match 'Monospace'
DroidSansFallbackFull.ttf: "Droid Sans Fallback" "Regular"

summary: - Awful system-wise generic selection for CJK
+ Awful generic selection for zh in Firefox
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Please note that if you use a Chinese locale, it's 69-language-selector-zh-??.conf which is effective, not 65-fonts-arphic-*.conf.

As regards the latter, one thought is to change it so UMing is preferred over UKai. Another thought is to drop the sans-serif items in 65-fonts-arphic-*.conf. Probably we'd need to test to see how Firefox behaves with those changes.

Also, this is reasonably not a trusty specific issue. It would be good if we could study this in the current development release (yakkety) first, and then backport if we figure out something better.

@Aron: Any thoughts?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

A simple test on 14.04 is to rename the symlink

/etc/fonts/conf.d/65-fonts-arphic-ukai.conf

to

/etc/fonts/conf.d/66-fonts-arphic-ukai.conf
-------------------^

$ LC_CTYPE=en_US.UTF-8 fc-match -a | grep -iE '(ar pl|droid)' | head -7
DroidSansFallbackFull.ttf: "Droid Sans Fallback" "Regular"
uming.ttc: "AR PL UMing CN" "Light"
uming.ttc: "AR PL UMing HK" "Light"
uming.ttc: "AR PL UMing TW" "Light"
ukai.ttc: "AR PL UKai CN" "Book"
ukai.ttc: "AR PL UKai HK" "Book"
ukai.ttc: "AR PL UKai TW" "Book"

Would that improve things?

It would give UKai lower precedence than the Chinese fonts preferred via 65-nonlatin.conf, but OTOH the latter are not included in the Chinese language support in Ubuntu 14.04+.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

More input from Chinese users is needed to make progress on this one. Feedback on my idea in comment #6 would be appreciated, as would other ideas on the desired direction.

Removing the trusty tasks for now. Let's decide what to do in the current development version first, and consider possible backporting later.

no longer affects: fonts-arphic-ukai (Ubuntu Trusty)
no longer affects: fonts-arphic-uming (Ubuntu Trusty)
no longer affects: language-selector (Ubuntu Trusty)
Changed in fonts-arphic-ukai (Ubuntu):
importance: Undecided → Wishlist
status: New → Incomplete
Changed in fonts-arphic-uming (Ubuntu):
importance: Undecided → Wishlist
status: New → Incomplete
Changed in language-selector (Ubuntu):
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for fonts-arphic-ukai (Ubuntu) because there has been no activity for 60 days.]

Changed in fonts-arphic-ukai (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for fonts-arphic-uming (Ubuntu) because there has been no activity for 60 days.]

Changed in fonts-arphic-uming (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for language-selector (Ubuntu) because there has been no activity for 60 days.]

Changed in language-selector (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.