I’ve been working on some color fonts, and unlike earlier designs, they will have to usable for others this time. There is currently a bug with the export of color (layer) fonts which will add all your components to the exported file, resulting in an unusable typeface. (with a pretty long glyphs panes.) With the color removed it all works fine, as each component is set to non-exporting, but it seems the color layers override this.
The happens with both methods: When the components have color layers themselves or when they are placed in a color layer in the character itself.
I found this topic which notes this problem. Is this the same bug? (as the post is from some years back.)
Just as a heads up, as I only took a brief note of it: Upon closer inspection it isn’t the components that get exported, but each color layer of each glyph gets a character of it’s own in the font. At first I thought this had to do with the export parameters (which does play a part), but even removing those (and exporting it as a non-color font) leads to a similar result.
My method isn’t great, but it is the only way to keep the export compatible with the Adobe apps, a webfont and future font variations.
COLR table layers are separate glyphs (OpenType has no concept of layers, this is a font editors idiom), so there is no way around Glyphs exporting each layer as a separate glyph.
Thank you, quite clear! For a webfont this is no problem, but for other apps this is tricky. So the only solution is to rebuild them (in Glyphs) using master with colors? (which export fine without extra glyphs). This will be fun, as the color order varies quite a lot in at least two of the experiments
I guess this does mean that any future Variable Color Fonts use (unless another standard is implemented) is off the table for desktop apps.
That is a limitation of glyph palette, a smarter one would have excluded glyphs that are only accessible from the COLR table, but Adobe apps don’t support COLR table AFAIK so not a big surprise.
SVG table embeds SVG documents in the font, so layers don’t have separate glyphs as this is a built-in concept in SVG, which why you don’t have the glyph palette issue with SVG font.
Your best option, IMO, is to create separate fonts, one with SVG table and one with COLR table.
I am currently using an COLR source to create both the Variable Color Font COLR TTF’s and the Adobe-compatible SVG-OTF’s. But when using the method from how to export to SVG, the export is in black.
So I have been using the Color Layers to SVG parameter, which works perfectly, but leads (as in the screengrab above) to a character for each color layer in each character.
Thanks! Seems that out of all combinations I made, this is the solution. But just for info: What is the output of Option B - Choice 2 on the tutorial? As it didn’t output as a color font for me, and I needed an combination of choice 2/3.
Sorry, I meant the options & choices posed in the tutorial I linked to. As not exporting with the SVG layers option ticked (as choice 2) gives a black/white file. (in Catalina font preview, when embedded in a webpage, or when inspected on sites such as Wakamaifondue).