[maximum_color] Ignore variation data when converting COLRv1=>SVG - #439
anthrotype wants to merge 2 commits into
Conversation
|
LGTM but I'm not a maintainer. I like the mapping approach you've used. |
|
Hm the spacing looks suspiciously bad in that screenshot.. maybe safari is applying the metrics of the regular but the SVG has the outlines of the thin? |
|
I'm just checking to see if the testing site itself is to blame. |
|
It's not the site, it's the font that advertises itself as variable (has fvar, HVAR, etc.) but then the SVG outlines are not. Honestly I think it doesn't make much sense to have hybrid COLRv1+SVG when the COLR table contains variations, since there can't be a 1:1 translation between the two; besides, leaving variable tables alongside static SVG leads to issues like the one above. Only static COLRv1 font can be meaninfully converted to OT-SVG. |
|
Here's a screenshot in safari using diffenator2 Seems to be getting more compressed as the weight increases. |
|
yes, that's expected. The font has HVAR, which varies along wght axis. The SVG doesn't move, the rest does.. |
|
See discussion #426 (comment), in particular Rod's last reply
|
|
basically, the only way to currently make an OT-SVG font for Foldit-VF is to
this will give you the Foldit-Thin.ttf (and only that one) with an SVG instead of a COLR table. |
|
Seems better to just leave the font as is. At least that way Safari users will get a font without any color which imo is better than just the thin weight. If we leave as is, maximum_color could raise a warning for this issue. |
|
maybe we need a separate tool (colr_instancer?) that takes a variable COLRv1 and spits out static OT-SVG fonts (for all named instances or specific selection). But that would first require implementing CORLv1 instancing in fontTools fonttools/fonttools#2699 |
From the above tests, I'd support this idea. Otherwise, it would break the whole idea of the font: serving a font that goes from thin-ultracondensed to black-extraexpanded with gradients that seems consistent through the entire range |



Fixes #426