Setting application color in COLR font?

Hello all.  I am working on a CJK font, which was constructed by importing ~30k SVGs into Glyphs.  OT-SVG has poor support on Windows, so I am trying to get a COLR version.

Glyphs can import SVGs into their proprietary Color layer, and in turn export that out as COLR/CPAL.  The problem is that their import discards fill="currentColor", and the Color layer also don't support setting the equivalent of currentColor.  I want parts of the font to respect the application color choice.

OpenType 1.9 specs says that "A palette entry index value of 0xFFFF is a special case indicating that the text foreground color (defined by the application) should be used".  Is there a way to set that value after the font had been exported?  Or does anyone have suggestions for how to approach this?



  • In the color selection of a layer, there is the “*” option. This uses the text color:

    Converting the SVG “currentColor” value to this special 0xFFFF/“*” color index is a good idea.

    Please keep editor-specific topics to the forums of those editors. We are happy to help over at the Glyphs Forum.
  • jkwchuijkwchui Posts: 2
    Thanks for the response, but I had already raised that in the Glyphs forum last July ( This solution you suggest applies to the Color Palette layers and not native Color layer.  My sense is that this is not possible in Glyphs, and I am looking to see if others have a non-Glyphs based suggestion.
  • Florian PircherFlorian Pircher Posts: 173
    edited February 28
    You are right, the full-color layers are currently only using fixed colors. We will offer arbitrary palette colors in addition to fixed colors for full-color layers in the future, but I cannot say just yet when that will be ready. For now, post-processing the exported font and editing the desired color index with a tool like TTX should do the trick. 
  • Aside:

    >OT-SVG has poor support on Windows...

    Actually, the platform has good support for OT-SVG: DWrite and Direct2D have APIs that make it not difficult for app developers to support OT-SVG, and these should work in the Windows XAML platform and WinUI.

    Support in Windows apps is, of course, a different matter. Adobe apps and Firefox on Windows do support OT-SVG. If you have an older version of Edge (pre-Chromium), that supported OT-SVG.
Sign In or Register to comment.