On Japanese macOS, font-family:monospace is ignored if Enhanced Tracking Protection is strict (because Osaka-Mono is unavailable)
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox121 | --- | fixed |
People
(Reporter: ucm8888, Assigned: jfkthame)
Details
Attachments
(5 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Steps to reproduce:
Firefox 119.0/macOS Ventura 13.6.1
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
-
Run the following in Terminal:
/Applications/Firefox.app/Contents/MacOS/firefox-bin -p -
Make new profile, and start Firefox.
-
open https://unkoh.github.io/mono.html
The textarea "monospace"(font-family:monospace) is displayed in a monospace font. -
Open Settings, and set "Enhanced Tracking Protection" to "strict", and reload all tabs.
Actual results:
The font of textarea in step 3 has changed to a non-monospaced.
Expected results:
The font of textarea in step 3 remains monospaced.
Firefox 118.0.2 doesn't reproduce.
(The font of textarea in step 3 remains monospaced.)
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 3•2 years ago
|
||
I'm not able to reproduce this (on macOS 14 here) .... I see the same monospace font (Menlo) regardless of the tracking protection setting.
Could you please attach a screenshot of how it displays for you? If you use the Inspector to examine the textarea, what font does it report is used in each case (with and without Strict tracking protection)?
I tried setting macOS to English, the problem could not be reproduced on either en-US or ja-JP of Firefox 119.0.
On Japanese macOS, I reproduced the problem with Firefox 119.0 en-US and ja-JP.
As shown in the attached screenshot, when set to Strict tracking protection, a warning such as "Request for font "Osaka-Mono" blocked at visibility level 2 (requires 3)" was displayed on the console.
| Assignee | ||
Comment 8•2 years ago
|
||
Oh, I see.... it's related to the macOS locale being Japanese, which is affecting the default font prefs used (and the document doesn't have a lang="en" or similar attribute that would cause the Western prefs to be used).
I was a bit surprised to see that Osaka (and Osaka-Mono) wasn't included in the standard set of macOS fonts, but according to https://developer.apple.com/fonts/system-fonts/?q=osaka it's provided as a downloadable (optional) font these days. So that's why it isn't in our list of standard fonts that are available under Strict tracking protection.
| Assignee | ||
Comment 9•2 years ago
|
||
Probably the simplest "quick fix" here is for us to insert Menlo into the Japanese monospace pref list, so that if Osaka-Mono isn't available (for whatever reason -- whether strict tracking protection or not-downloaded or whatever) we still get monospaced Latin characters.
@UCM, if you go to about:config and find the pref font.name-list.monospace.ja, and edit the value to add Menlo after the existing mention of Osaka-Mono (but before the other fonts in the list), so the value becomes Osaka-Mono, Menlo, Hiragino Kaku Gothic ProN, Hiragino Sans, does that fix the issue for you on Japanese macOS? I would expect that to help.
| Assignee | ||
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Comment 11•2 years ago
|
||
| Reporter | ||
Comment 12•2 years ago
|
||
(In reply to Jonathan Kew [:jfkthame] from comment #9)
@UCM, if you go to
about:configand find the preffont.name-list.monospace.ja, and edit the value to add Menlo after the existing mention of Osaka-Mono (but before the other fonts in the list), so the value becomesOsaka-Mono, Menlo, Hiragino Kaku Gothic ProN, Hiragino Sans, does that fix the issue for you on Japanese macOS? I would expect that to help.
ASCII characters were displayed in Menlo, but non-ASCII characters were displayed in Hiragino Sans, which is not monospaced. So, I doubt whether this is the correct behavior for "font-family:monospace".
Is it really important to avoid using downloaded Osaka-Mono for Strict tracking protection?
(And does that mean there was a bug before 119.0 which was no avoidance?)
I am ignorant about tracking users using fonts, but it seems that there is no problem using Osaka-Mono even in Strict tracking protection. At least if Osaka-Mono is already downloaded.
(I think the fundamental problem is that the macOS Japanese environment does not include monospaced Japanese fonts by default...)
| Reporter | ||
Comment 13•2 years ago
|
||
| Assignee | ||
Comment 14•2 years ago
|
||
(In reply to UCM from comment #12)
(In reply to Jonathan Kew [:jfkthame] from comment #9)
@UCM, if you go to
about:configand find the preffont.name-list.monospace.ja, and edit the value to add Menlo after the existing mention of Osaka-Mono (but before the other fonts in the list), so the value becomesOsaka-Mono, Menlo, Hiragino Kaku Gothic ProN, Hiragino Sans, does that fix the issue for you on Japanese macOS? I would expect that to help.ASCII characters were displayed in Menlo, but non-ASCII characters were displayed in Hiragino Sans, which is not monospaced. So, I doubt whether this is the correct behavior for "font-family:monospace".
OK, that's what I would expect -- it's not ideal, but in general there's no guarantee that 'monospace' will truly result in monospaced text across any arbitrary mixture of scripts. (Even if there's a font that provides monospaced Kanji and Latin, for instance, what happens when a Greek or Arabic or Hindi character is found? No individual font supports every possible character, so mixtures will inevitably occur.)
Is it really important to avoid using downloaded Osaka-Mono for Strict tracking protection?
(And does that mean there was a bug before 119.0 which was no avoidance?)I am ignorant about tracking users using fonts, but it seems that there is no problem using Osaka-Mono even in Strict tracking protection. At least if Osaka-Mono is already downloaded.
(I think the fundamental problem is that the macOS Japanese environment does not include monospaced Japanese fonts by default...)
Yes, that's the more fundamental problem; adding Menlo to the list is just a partial workaround to help with Latin characters, but as you noted, it doesn't do anything for Japanese characters.
Comment 15•2 years ago
|
||
| bugherder | ||
Description
•