<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>218372</bug_id>
          
          <creation_ts>2020-10-29 20:19:19 -0700</creation_ts>
          <short_desc>[FreeType] Missing support for COLR/CPAL fonts.</short_desc>
          <delta_ts>2023-09-27 15:36:07 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=218346</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>7t3chguy</cc>
    
    <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>changseok</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1702958</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-10-29 20:19:19 -0700</bug_when>
    <thetext>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 ]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702963</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-10-29 20:28:41 -0700</bug_when>
    <thetext>Updated expectations on r269178</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1871738</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-25 09:12:47 -0700</bug_when>
    <thetext>Related: https://webkit.org/blog/12662/customizing-color-fonts-on-the-web/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1871869</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-05-25 15:44:19 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #0)

&gt; Online tests:
&gt; https://pixelambacht.nl/demo/color-font-test.html
&gt; https://pixelambacht.nl/chromacheck/
&gt; 
&gt; On r269177 43 new layout tests were added to test the support for COLR/CPAL
&gt; and SBIX fonts.
&gt; 
&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1871874</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-25 16:06:33 -0700</bug_when>
    <thetext>Complaint in https://gitlab.gnome.org/GNOME/epiphany/-/issues/1782 is specifically that COLRv0 doesn&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1947249</commentid>
    <comment_count>5</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-04-07 02:59:46 -0700</bug_when>
    <thetext>*** Bug 255143 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>