Closed Bug 1769279 Opened 2 years ago Closed 2 years ago

Work around FreeType 2.12 issue with glyph metrics when using SVG-in-OT fonts

Categories

(Core :: Graphics: Text, defect)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

This was discovered while trying to update our in-tree FreeType lib (used on Android) to 2.12 in bug 1768944, but will also affect desktop Linux users where the system FreeType is updated to 2.12 or later.

See https://gitlab.freedesktop.org/freetype/freetype/-/issues/1156 for the underlying issue, which I believe should be fixed upstream; but in the meantime, we can work around it by disabling the FT_LOAD_COLOR flag when getting glyph metrics.

We also need a small patch in Skia to avoid hitting an assertion in debug builds when encountering the new FT_GLYPH_FORMAT_SVG format. (The fact that such glyphs are not actually supported for rendering in our Skia version doesn't matter, because we handle the rendering separately in thebes.)

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/180486faa9c3
Disable FT_LOAD_COLOR when getting glyph metrics for fonts that include an SVG table. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: