Closed
Bug 484191
Opened 16 years ago
Closed 3 years ago
lang="yue" and lang="zh-yue" (Cantonese) displayed using Simplified Chinese and Japanese fonts
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: henry.fai.hang.chan, Assigned: m_kato)
References
(Depends on 1 open bug, )
Details
(Keywords: fonts, intl)
Attachments
(1 file)
58 bytes,
text/x-review-board-request
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090316 Shiretoko/3.1b4pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090316 Shiretoko/3.1b4pre
When a website has ' lang="zh-yue"' in the html element, somehow firefox uses the Simplified Chinese font specified in options. zh-yue is the local for Cantonese, used primary in Hong Kong, so therefore it should have used the Traditional (Hong Kong) font specified.
Reproducible: Always
Steps to Reproduce:
1.Go to the site
2.Change your font settings of Simplified Chinese to any Chinese Font
3.You see changes immediately
4.Change your font settings of Traditional Chinese (Hong Kong) to any Chinese Font
5.Change your font settings of Traditional Chinese (Hong Kong) to any Chinese Font
6.Nothing happens after 4 and 5, thus showing firefox wrongly detects the language.
However with the ' lang="zh"' attribute at http://zh.wikipedia.org/, changing any of the Simp Chinese / Trad Chinese (Taiwan) / Trad Chinese (Hong Kong) is reflected instantly.
Reporter | ||
Comment 1•16 years ago
|
||
zh-yue is the "locale" for Cantonese, not "local"
Updated•16 years ago
|
Assignee: nobody → smontagu
Component: File Handling → Internationalization
Product: Firefox → Core
QA Contact: file.handling → i18n
Comment 2•16 years ago
|
||
Is Cantonese not also used in Simplified Chinese script in some areas of mainland China?
Reporter | ||
Comment 3•16 years ago
|
||
Yes but the Wikipedia site has focused to use Traditional Chinese script.
The standard for written Chinese in China is that [all traditional words, old word form (字型, for example two dots instead of three for some words), derived words (異體字) and common written changes (俗字) (actually simpfified. Chinese is based on common writing in China about 50 years ago, when words written without their ideograph meaning were most common)] is forbidden to be used in normal circumstances.
I wouldn't think China would extend this policy to cover any website, since they encourages people to follow their "standard". (The Taiwan or Hong Kong "standard" of word form is not very good either, although most of the time it follows the ideograph meaning)
Hong Kong people are much more likely to write in Cantonese dialect instead of Guangdong citizens due to the policies (although the chance isn't very high in both cases).
Well then it might be better if firefox could detect Traditional Chinese / Simplified Chinese based on context.
Comment 4•16 years ago
|
||
I think the only satisfying solution will be to create a new font category for written Cantonese.
This is the only way not to impose traditional to mainland users, nor simplified to Hong-Kong users. Also Cantonese does use a few specific characters, so you might want a font with a good version of those that would not be be the preferred font for neither traditional nor simplified .
Reporter | ||
Comment 5•14 years ago
|
||
PMingLiu-ExtB would be a good choice.
For the while being i think resolving zh-yue to zh-hk would be a good choice since
1) mainland blocks all wikimedia projects
2) most people that use written cantonese are in hong kong
3) fonts for hk (PMingLiu-ExtB) are the default for zh-hk
4) written cantonese forms are not in GB standards, but in HKSCS standards.
5) written cantonese are historically encoded in big5-hkscs.
Comment 6•10 years ago
|
||
workaround |
Nowadays Wikipedia in Cantonese specifies lang="yue". On my system, much of the text is rendered in a mixture of MS PGothic (a Japanese font) and Microsoft YaHei (a Simplified Chinese font). Since Firefox doesn't recognize the language code, the end result is basically the hodge-podge mentioned in bug 677919.
The following user style improves things somewhat. It can be applied with the Stylish add-on [1] or the userContent.css file [2].
@-moz-document domain("zh-yue.wikipedia.org") {
* { font-family: "Microsoft JhengHei", sans-serif !important; }
[lang]:not([lang$="yue"]) { font-family: sans-serif !important; }
}
[1] https://addons.mozilla.org/firefox/addon/stylish/
[2] http://kb.mozillazine.org/UserContent.css
Reporter | ||
Comment 7•10 years ago
|
||
This is unsatisfactory. At least, either zh-HK or zh-CN fonts should be used.
Assignee | ||
Comment 8•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/35601/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/35601/
Attachment #8721183 -
Flags: review?(jfkthame)
Assignee | ||
Updated•9 years ago
|
Assignee: smontagu → m_kato
Assignee | ||
Comment 9•9 years ago
|
||
I don't add reftest (compare of html lang="zh-hk" vs html lang="yue") due to our reftest VMs cannot compare both lang fonts
Comment 10•9 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #9)
> I don't add reftest (compare of html lang="zh-hk" vs html lang="yue") due to
> our reftest VMs cannot compare both lang fonts
I don't understand this... can you explain what you mean? Why wouldn't it work to have reftests that compare a testcase with lang="yue" against a reference with lang="zh-hk"?
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #10)
> (In reply to Makoto Kato [:m_kato] from comment #9)
> > I don't add reftest (compare of html lang="zh-hk" vs html lang="yue") due to
> > our reftest VMs cannot compare both lang fonts
>
> I don't understand this... can you explain what you mean? Why wouldn't it
> work to have reftests that compare a testcase with lang="yue" against a
> reference with lang="zh-hk"?
https://treeherder.mozilla.org/#/jobs?repo=try&revision=642f599a5c8e
Non-fontconfig platforms (Windows, Mac and Android) has full font name list into preferences such as font.name-list. But fontconfig platform such as GTK doesn't have font name list into it. So, fontconfig resolves real font name by generic family name since preferences uses "serif" etc.
Since lang is different, it will return another font.
Also, although I compare zh-yue and yue, it is failure. Should I add this reftest and skip-if(gtk)?
Comment 12•9 years ago
|
||
Sounds fine to just skip-if(gtk) if that works.
Comment 14•3 years ago
|
||
It looks like lang=yue
is still what wikipedia (for example) is using, so I suspect this is still an issue.
Makoto, should we be going ahead with the patch here, or have other changes made it obsolete or unimportant?
Flags: needinfo?(jfkthame) → needinfo?(m_kato)
Assignee | ||
Comment 15•3 years ago
|
||
I re-look this issue. Since we have moved langGroup.properties to mozilla::intl::Locate to parse locale string, "yue" is parsed to "zh-HK" now. And, also, rendering text doesn't select Simplified Chinese now.
This should close as WFM. But feel free to reopen this if there is still this issue.
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(m_kato)
Resolution: --- → WORKSFORME
Updated•3 years ago
|
Attachment #8721183 -
Flags: review?(jfkthame)
You need to log in
before you can comment on or make changes to this bug.
Description
•