Bug 218372

Summary: [FreeType] Missing support for COLR/CPAL fonts.
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: 7t3chguy, aperez, bugs-noreply, cgarcia, changseok, mcatanzaro, mmaxfield, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=218346

Carlos Alberto Lopez Perez
Reported 2020-10-29 20:19:19 PDT
COLR/CPAL fonts are one type of OpenType color fonts. These fonts compose layers of vector outline glyphs and color palette information into the final colored glyph. Because they are vector based, COLR/CPAL fonts provide for faster downloads and require less storage. Online tests: https://pixelambacht.nl/demo/color-font-test.html https://pixelambacht.nl/chromacheck/ On r269177 43 new layout tests were added to test the support for COLR/CPAL and SBIX fonts. As far as I can see WebKitGTK/WPE supports SBIX fonts but not COLR fonts. This are the failures from those 43 test addeds: Regressions: Unexpected image-only failures (29) fast/text/canvas-color-fonts/COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/fill-color-shadow-COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/fill-color-shadow-ctm-COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/linedash-COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/stroke-color-COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/stroke-color-shadow-COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/stroke-gradient-COLR-3.html [ ImageOnlyFailure ] fast/text/canvas-color-fonts/stroke-gradient-COLR-4.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/ctm-sbix-2.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/ctm-sbix-3.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/ctm-sbix-4.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-color-sbix-2.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-color-sbix-3.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-color-sbix-4.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-color-shadow-ctm-sbix.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-color-shadow-sbix.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-gradient-sbix-2.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-gradient-sbix-3.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/fill-gradient-sbix-4.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/stroke-color-sbix.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/stroke-color-shadow-ctm-sbix.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/stroke-color-shadow-sbix.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/stroke-gradient-sbix-2.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/stroke-gradient-sbix-3.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/stroke-gradient-sbix-4.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/text-sbix-2.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/text-sbix-3.html [ ImageOnlyFailure ] http/tests/canvas/color-fonts/text-sbix-4.html [ ImageOnlyFailure ]
Attachments
Carlos Alberto Lopez Perez
Comment 1 2020-10-29 20:28:41 PDT
Updated expectations on r269178
Michael Catanzaro
Comment 2 2022-05-25 09:12:47 PDT
Adrian Perez
Comment 3 2022-05-25 15:44:19 PDT
(In reply to Carlos Alberto Lopez Perez from comment #0) > Online tests: > https://pixelambacht.nl/demo/color-font-test.html > https://pixelambacht.nl/chromacheck/ > > On r269177 43 new layout tests were added to test the support for COLR/CPAL > and SBIX fonts. > > As far as I can see WebKitGTK/WPE supports SBIX fonts but not COLR fonts. The firs linked page above claims that WebKitGTK 2.36.2 supports COLR; the second one says it supports COLR but not COLRv1 (I am not sure what the difference is). This is with Freetype 2.12.1, Pango 1.50.7, and Harfbuzz 4.3.0
Michael Catanzaro
Comment 4 2022-05-25 16:06:33 PDT
Complaint in https://gitlab.gnome.org/GNOME/epiphany/-/issues/1782 is specifically that COLRv0 doesn't work.
ChangSeok Oh
Comment 5 2023-04-07 02:59:46 PDT
*** Bug 255143 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.