Bug 218372
| Summary: | [FreeType] Missing support for COLR/CPAL fonts. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Alberto Lopez Perez <clopez> |
| Component: | WebKitGTK | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Carlos Alberto Lopez Perez
Updated expectations on r269178
Michael Catanzaro
Related: https://webkit.org/blog/12662/customizing-color-fonts-on-the-web/
Adrian Perez
(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
Complaint in https://gitlab.gnome.org/GNOME/epiphany/-/issues/1782 is specifically that COLRv0 doesn't work.
ChangSeok Oh
*** Bug 255143 has been marked as a duplicate of this bug. ***