Closed Bug 1647995 Opened 5 years ago Closed 5 years ago

The SimSun font is displayed incorrectly for two minutes when the platform font list is reinitialized

Categories

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

79 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox79 --- affected

People

(Reporter: over68, Unassigned)

References

Details

Attachments

(1 file)

Attached file testcase

Steps to reproduce:

  1. Set gfx.e10s.font-list.shared to true.
  2. Restart Firefox.
  3. Download Font Loader.
  4. Download Franklin Gothic Book Regular.ttf.
  5. Open the testcase.
  6. Open the Font Loader, Click on the Add Fonts button, Select the font file Franklin Gothic Book Regular.ttf then click Open.
  7. Click on the Load button.

Actual results:

The SimSun font is displayed incorrectly for two minutes when the platform font list is reinitialized.

Blocks: 1533462

This applies when the browser is initially launched, as well as after the list is reinitialized (due to installation/removal of fonts on the system). I thought the code was supposed to recognize when a non-ASCII font name is requested, and eagerly run the search for alternative family names, but this may be broken.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

Rather than depending on a separate search for localized font-family names, the easy way forward here is to create duplicate Family records with the localized names as part of font-list initialization. The DirectWrite API already has these names in the IDWriteLocalizedStrings that we get from each family, so we can easily record all the names (there's usually just one, except in the case of some CJK fonts).

The only downside of this is that the fonts will show up under both English and localized names in the Preferences font list. To avoid that, we can keep track of which names are for an "alternate" locale (not the current system locale) and hide those from the Preferences list, although they'll still be accepted if used in font-family.

(Patches to fix this posted to bug 1648474, which is also related to localized font names.)

See Also: → 1648474
Status: NEW → RESOLVED
Closed: 5 years ago
Depends on: 1648474
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: