Closed Bug 1928012 Opened 1 year ago Closed 1 year ago

Modernize Windows implementation of GetCommonFallbackFonts

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

It's time we updated the Windows implementation of GetCommonFallbackFonts, similarly to what was done for macOS in bug 1687622:

... rewrite gfxPlatformMac::GetCommonFallbackFonts to work primarily from the resolved script run of the text being processed, instead of the rather ad hoc assignment of fonts based on blocks of Unicode codepoints. That approach doesn't scale well to supporting the large number of separate scripts that now have appropriate fallback fonts available.

Making the Windows version work similarly will make it easier to incorporate support for more writing systems and future updates to Unicode.

Mapping fallback fonts based on script code rather than hard-coded
blocks of Unicode codepoints is much more readable and maintainable.

We should periodically review what fonts Windows is shipping, and add
entries for new scripts as they become available. (Note that it is not
necessary for a font to be listed here in order to be used; global
fallback will still find it, if available. The mappings here just
provide a fast-path that tries to avoid the cost of a global search.)

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/73ae30d15fdd Modernize implementation of GetCommonFallbackFonts for Windows. r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Regressions: 1932814
Regressions: 1947151
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: