Modernize Windows implementation of GetCommonFallbackFonts
Categories
(Core :: Layout: Text and Fonts, enhancement)
Tracking
()
| 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.
| Assignee | ||
Comment 1•1 year ago
|
||
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.)
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| bugherder | ||
Description
•