nabla
nabla copied to clipboard
why build.sh uses fontmake with --no-optimize-gvar option?
just curious why you decided to turn off the gvar IUP optimization? Is it for speed or does it create issues somewhere else?
It creates subtle rendering issues with a EHLT value of 0: the highlight outlines should reduce to an infinitely thin line, but with IUP optimization there are tiny differences, making the highlight path not disappear completely.
See the super thin but visibly noisy white line on the edge. It's completely gone if I don't do IUP optimization.
Interesting... /cc @behdad @drott @rsheeter
Very interesting and bizarre. I'll try to reproduce.
Just checking, what rasterizer is that renderer using? FreeType?
I don't really know if it's FreeType: the screenshot is from Chrome on macOS. But I get the same (or similar) artifacts when extracting the outlines with fonttools, and similar (but likely different) artifacts when using the harfbuzz draw API via FontGoggles.
This is zooming in on the middle stroke of E.highlight in Fontra (which uses the new fonttools var glyph set):
https://user-images.githubusercontent.com/4246121/190213128-5aec5ea5-ec79-4899-aa94-77b6fe0275c2.mov
It looks like the IUP points are not rounded to the unit grid, and we get ever so slightly different rounding errors
Here is the Nabla font with the IUP optimization on: Nabla[EDPT,EHLT]_IUP.ttf.zip
Check the E.highlight glyph with the EHLT axis set to 0.
It looks like the IUP points are not rounded to the unit grid, and we get ever so slightly different rounding errors
Interesting. Yes, that would explain this. I wonder if the spec should say IUP results are rounded to grid...
Alternatively you can try changing the tolerance in varLib init add_gvar to 0 instead of .5; that should fix this but significantly reduce effectiveness of IUP.
cc @PeterCon
(Looking closer: I think one off-curve point is IUP optimized, and its counterpart isn't.)
Note that the distance between those off curve points (which should ideally be zero) is far less than one unit. I estimate between 1/4th and 1/3rd unit.
I don't think anything is broken here, and this is an edge case, and I'm 100% happy with turning off the optimization for this font.
Turning on IUP optimization makes the font about 10KB smaller, but at about 550KB total file size, I'm not sure I care.
I gather this issue arises for many (or most?) glyphs in the font?
Turning on IUP optimization makes the font about 10KB smaller, but at about 550KB total file size, I'm not sure I care.
Yeah in general I've found the IUP optimization to have such a small win (2 to 3%, as you observe).