Closed
Bug 1220019
Opened 9 years ago
Closed 9 years ago
Map cursive generic font family to Kai in Chinese
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla50
People
(Reporter: xidorn, Assigned: xidorn)
References
(Blocks 1 open bug)
Details
(Whiteboard: [parity-webkit])
Attachments
(3 files)
Kai is one of the four most frequently-used fonts in Chinese (including Simplified Chinese and Traditional Chinese), and have different font family name in different platforms. Authors want to have one generic font family to use this kind of fonts on all platforms instead of listing all of them in the font-family property.
A proposal is that Kai should be mapped as cursive in Chinese. Although Kai may not seem to be completely a cursive font, it is still reasonable to do so based on its origin and shape.
Currently, cursive is not widely-used in Chinese language (and actually we do not have any sensible mapping yet), so it makes sense to do this.
John Daggett, Bobby Tung (from Taiwan) and I discussed this during the break of CSSWG f2f meeting in TPAC, and IIRC we have consensus about this, so it is expected that the spec should be updated accordingly.
WebKit has been shipping this mapping. We should do this as well.
Comment 1•9 years ago
|
||
Output of:
plutil -p /System/Library/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist
For Chinese:
0 => "zh-Hans"
1 => "STKaiti-SC-Regular"
0 => "zh-Hant"
1 => "STKaiTi-TC-Regular"
Comment 2•9 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+9) from comment #0)
> WebKit has been shipping this mapping. We should do this as well.
This is OSX specific and for OSX I think we simply need to reflect system defaults into out font pref lists. This should be a priority list across OSX versions, with OSX 10.11 defaults at the head of the list where they differ from older OS versions. It would be nice to make this somehow programmatically possible but I don't see any clear way to do this with a public API.
Not sure what the Kai fonts should be for Windows/Linux/Android.
Updated•9 years ago
|
Assignee: nobody → jdaggett
Assignee | ||
Comment 3•9 years ago
|
||
Bobby has an image about this: https://cdn-images-1.medium.com/max/1600/1*54sLzm-OMOJ6OCt1GWkPEw.png
Comment 4•9 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+9) from comment #3)
> Bobby has an image about this:
> https://cdn-images-1.medium.com/max/1600/1*54sLzm-OMOJ6OCt1GWkPEw.png
Hmmm, so favor SimKai over Kaiti?
Our current pref for windows:
> pref("font.name.cursive.zh-CN", "KaiTi");
Assignee | ||
Comment 5•9 years ago
|
||
Hmm, it seems KaiTi is added later than SimKai, so we probably should keep using KaiTi, but add SimKai as a fallback. I'll confirm with Bobby about that.
Comment 7•9 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #5)
> Hmm, it seems KaiTi is added later than SimKai, so we probably should keep
> using KaiTi, but add SimKai as a fallback. I'll confirm with Bobby about
> that.
Which of these two should be preferred?
Flags: needinfo?(jd.bugzilla) → needinfo?(quanxunzhen)
Assignee | ||
Comment 8•9 years ago
|
||
Sorry I forgot to confirm...
It seems SimKai is Kaiti. SimKai is the filename while Kaiti is its font name.
I just got a new version of that table of the fonts. Please see the note in this file.
Flags: needinfo?(quanxunzhen)
Assignee | ||
Updated•9 years ago
|
Assignee: jd.bugzilla → bugzilla
Assignee | ||
Comment 9•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/54516/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/54516/
Attachment #8755288 -
Flags: review?(jfkthame)
Assignee | ||
Comment 10•9 years ago
|
||
So basically this patch does three things:
1. add KaiTi_GB2312 to the name-list.cursive.zh-CN because it seems to me KaiTi_GB2312 is the name of KaiTi on Windows XP
2. add DFKai-SB as cursive.zh-TW for tranditional Chinese for Windows
3. add Kaiti SC/TC as cursive font for OS X
The table provided in comment 8 says OS X uses STKaiti-SC/TC, but I cannot find those fonts in my system. The file Kaiti.ttc there contains three different families named "Kaiti SC", "Kaiti TC", and "STKaiti", so I suppose we actually want them rather than STKaiti-SC/TC.
Assignee | ||
Updated•9 years ago
|
Attachment #8755288 -
Flags: review?(jfkthame) → review?(jd.bugzilla)
Comment 11•9 years ago
|
||
Sorry for the delay here, I saw the original r? but then other things crowded it off my radar... :(
IMO this seems fine, but perhaps it'd be best to have it reviewed by someone from the Beijing and/or Taipei offices, to see if they have any comments on the appropriate font mappings.
Assignee | ||
Comment 12•9 years ago
|
||
Jack, could you find someone in Beijing office to verify that cursive font family would be correctly mapped to some Kai font (楷体) on all supported Windows (XP ~ 10) and Mac (10.9 ~) for zh-CN content with this patch applied?
Testing code could be something like:
data:text/html;charset=UTF-8,<p lang="zh-CN" style="font: 52px cursive">你好
Flags: needinfo?(jguo)
Assignee | ||
Comment 13•9 years ago
|
||
Astley, could you find some one in Taipei office to verify that cursive font family would be correctly mapped to some Kai font (楷體) on all supported Windows (XP ~ 10) and Mac (10.9 ~) for zh-TW (and probably also zh-HK) content with this patch applied?
Testing code could be something like:
data:text/html;charset=UTF-8,<p lang="zh-TW" style="font: 52px cursive">你好
Flags: needinfo?(aschen)
Comment 14•9 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #13)
> Astley, could you find some one in Taipei office to verify that cursive font
> family would be correctly mapped to some Kai font (楷體) on all supported
> Windows (XP ~ 10) and Mac (10.9 ~) for zh-TW (and probably also zh-HK)
> content with this patch applied?
>
> Testing code could be something like:
> data:text/html;charset=UTF-8,<p lang="zh-TW" style="font: 52px cursive">你好
Tested on Windows 10, OSX 10.11 with locale zh-TW, cursive successfully maps to DFKai-SB and Kaiti TC respectively.
I'll have QA and IT help for other platforms, versions, locales testing and update the result in this bug.
Flags: needinfo?(aschen)
Assignee | ||
Comment 15•9 years ago
|
||
You can use builds from this try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f36dc36bd6c1 (Sorry that I didn't push that before I asked for help)
To check the font mapped, you can enable "devtools.fontinspector.enabled" in about:config, then view the used font in the Inspector of the developer tools.
Comment 16•9 years ago
|
||
Comment on attachment 8755288 [details]
MozReview Request: Bug 1220019 - Use Kaiti for cursive in Chinese. r?jfkthame
Looks fine to me, as long as you've verified that these are the actual *family* names that are used for those font families.
Attachment #8755288 -
Flags: review?(jd.bugzilla) → review+
Assignee | ||
Comment 17•9 years ago
|
||
I've verified on the following platforms that it works:
1. Windows 10 zh-CN, zh-TW
2. Windows XP zh-CN
3. OS X 10.10 zh-CN, zh-TW
And Astley verified on the following platforms:
1. Windows 10 zh-TW
2. Windows XP zh-TW
3. OS X 10.11 zh-TW, zh-CN
I guess it should be good enough to go. The only uncertainity is OS X 10.9 which we are still supporting. But I'm not too worried about that.
Comment 18•9 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0ecb5f3f7b7
Use Kaiti for cursive in Chinese. r=jtd
Comment 19•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Assignee | ||
Comment 20•9 years ago
|
||
Canceling the ni? as the bug has been resolved...
Flags: needinfo?(jguo)
You need to log in
before you can comment on or make changes to this bug.
Description
•