googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
238 stars 20 forks source link

maximum_color changes the glyph order #464

Closed justvanrossum closed 11 months ago

justvanrossum commented 11 months ago

Is there an option for maximum_color to leave the glyph order of the source font alone? I only found --keep_glyph_names, but no option related to the glyph order.

We are using maximum_color to add an SVG table to a COLRv1 font and would love to keep the original glyph order.

Reordering the output of maximim_color to our desired glyph order is difficult since the SVG table contains glyph IDs in the SVG source.

anthrotype commented 11 months ago

we reorder the glyphs to take advantage of shape reuse in combined svg documents that reference multiple glyphs in a given range of glyph ids... I suppose we could have an optional mode that does not reorder but then the reuse would also be less effective.

justvanrossum commented 11 months ago

Thanks, that explains a lot! It sounds like a reasonable trade off. I’m not sure we want the font to get bigger indeed. Will close for now.

rsheeter commented 11 months ago

Sg. Please reopen if you decide you do need this; shouldn't be a huge deal to add. I'm curious, does the reordering cause problems? - my naive understanding was it shouldn't matter.

anthrotype commented 11 months ago

it may matter for things like Adobe Indesign Glyph palette which shows all the glyphs sorted by glyph order (including partial "glyphlets" that make up a layered color glyph)