Last Comment Bug 826610 - Wrong default monospace font on Firefox for Mac with zh-CN locale
: Wrong default monospace font on Firefox for Mac with zh-CN locale
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: 17 Branch
: All Mac OS X
: -- normal (vote)
: mozilla21
Assigned To: Xidorn Quan [:xidorn] (UTC+10)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-03 22:51 PST by Xidorn Quan [:xidorn] (UTC+10)
Modified: 2013-01-08 17:46 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
A patch to solve this bug. (688 bytes, patch)
2013-01-03 22:51 PST, Xidorn Quan [:xidorn] (UTC+10)
no flags Details | Diff | Splinter Review
Modified patch, which follows the default pref of zh-TW and zh-HK (1.02 KB, patch)
2013-01-04 05:22 PST, Xidorn Quan [:xidorn] (UTC+10)
smontagu: review+
Details | Diff | Splinter Review

Description Xidorn Quan [:xidorn] (UTC+10) 2013-01-03 22:51:36 PST
Created attachment 697807 [details] [diff] [review]
A patch to solve this bug.

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121128204232

Steps to reproduce:

Install Simplified Chinese version of Firefox for Mac.


Actual results:

The default monospace font is STHeiti which is not a monospace font at all.


Expected results:

The default monospace font should be a monospace font anyway. It is better to use the default monospace font of Mac OS X which is Menlo.
Comment 1 Jonathan Kew (:jfkthame) 2013-01-04 04:45:18 PST
Implementation of the "monospace" font preference for non-Latin-script locales is pretty variable (as can be seen by scanning down all the "font.*.monospace.*" settings in all.js). In some cases, the default "monospace" font is the same as the default "serif" and/or "sans-serif" (also a distinction that doesn't make sense across all scripts/locales), and in some cases it's virtually impossible to have a reasonable-looking type design that is in fact monospaced.

Having said that, I think it probably makes sense to make a change here, so that *Latin-script* text viewed in the zh-CN locale will use a more appropriate default for monospaced content (<pre>, etc). Whether Menlo is the right choice is a different question, though; I note that the zh-TW and zh-HK locales go for Courier, which also matches the Western pref. So maybe that would be better, in the interests of consistency.

smontagu, any opinion on this? Who should be making the decision here?
Comment 2 Jonathan Kew (:jfkthame) 2013-01-04 04:48:49 PST
Comment on attachment 697807 [details] [diff] [review]
A patch to solve this bug.

In any case, if we change the default to either Menlo or Courier, we should probably keep STHeiti in the name-list preference; otherwise, I'm not sure what fallback will pick for Chinese characters that occur within monospace-styled elements but aren't available in the specified default monospace font.
Comment 3 Xidorn Quan [:xidorn] (UTC+10) 2013-01-04 05:10:41 PST
(In reply to Jonathan Kew (:jfkthame) from comment #1)
> Having said that, I think it probably makes sense to make a change here, so
> that *Latin-script* text viewed in the zh-CN locale will use a more
> appropriate default for monospaced content (<pre>, etc). Whether Menlo is
> the right choice is a different question, though; I note that the zh-TW and
> zh-HK locales go for Courier, which also matches the Western pref. So maybe
> that would be better, in the interests of consistency.

I agree that Courier is the right one since I found that Safari uses it too. I'll modify the patch.
Comment 4 Xidorn Quan [:xidorn] (UTC+10) 2013-01-04 05:22:16 PST
Created attachment 697884 [details] [diff] [review]
Modified patch, which follows the default pref of zh-TW and zh-HK
Comment 5 Jonathan Kew (:jfkthame) 2013-01-04 05:59:12 PST
Comment on attachment 697884 [details] [diff] [review]
Modified patch, which follows the default pref of zh-TW and zh-HK

I think this change makes sense, but asking smontagu for review to get another set of eyes on it.
Comment 6 Simon Montagu :smontagu 2013-01-08 02:34:26 PST
Comment on attachment 697884 [details] [diff] [review]
Modified patch, which follows the default pref of zh-TW and zh-HK

Review of attachment 697884 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, this seems reasonable to me.
Comment 7 Jonathan Kew (:jfkthame) 2013-01-08 03:18:33 PST
OK, I pushed this to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/772f995a7e26
Comment 8 Ryan VanderMeulen [:RyanVM] 2013-01-08 17:46:26 PST
https://hg.mozilla.org/mozilla-central/rev/772f995a7e26

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