-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why build.sh uses fontmake with --no-optimize-gvar option? #40
Comments
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. |
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): Screen.Recording.2022-09-14.at.18.38.02.movIt 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 |
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? |
Yeah in general I've found the IUP optimization to have such a small win (2 to 3%, as you observe). |
just curious why you decided to turn off the gvar IUP optimization? Is it for speed or does it create issues somewhere else?
The text was updated successfully, but these errors were encountered: