Closed Bug 1561600 Opened 5 years ago Closed 5 years ago

The macOS Japanese monospace font Osaka-Mono is not available when shared font-list is enabled

Categories

(Core :: Layout: Text and Fonts, defect, P3)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

This font is "special" in that the monospaced face is included in the Osaka font family, but in order to be able to configure it as the default monospace font for Japanese, we need to expose it as a separate font-family name.

The pref "font.single-face-list" exists to support this, but currently the macOS backend for the shared font-list code doesn't handle this pref, and so monospace doesn't work properly in Japanese; we just get a fallback font.

Fortunately, we have a fairly straightforward way to support this: the shared font list already implements an "alias" mechanism to allow additional family names to refer to specific faces, which is used to support families with localized names, as well as legacy family names like "Arial Narrow" that refers to an individual face within the Arial family.

So we can treat Osaka-mono similarly: we'll read the font.single-face-list pref, just like the old font-list code does, and set up an alias record for this face (or any other that might happen to be listed, although I doubt this pref has ever been used for anything else).

(The effect of this bug can be seen, for example, in about:memory when running in a Japanese environment: the main content of the report uses <pre> elements, which are styled with font-family:monospace in the UA stylesheet, but because the Osaka-mono "family" isn't recognized, we end up with a default fallback font instead. We can't really do an automated test, though, as the Osaka font isn't present by default on non-Japanese installations.)

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7bc807167dc9 Support the special Osaka-mono font (family) for Japanese on macOS, by hooking up the font.single-face-list pref to the shared font-list's alias table. r=jwatt
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → jfkthame
QA Whiteboard: [qa-69b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: