-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add option to change unitsPerEm of compiled font? #376
Comments
@davelab6 didn't you think about increasing upMs for VFs generally for smoother interpolation? |
Such an option will need also to scale GPOS data that are stored in the feature file. |
you're right. We also need to scale all the numbers expressed in font design units that occur in GPOS value records or anchor statements and others. |
By the way, fontMath seems to be doing more than just scaling: it's filtering points that it deems unnecessary, converting lines into curves, etc. which means scaled masters are not guaranteed to keep interpolation compatibility. So I changed that scale_ufo.py script of mine to use ufo2ft's TransformationsFilter to scale the glyphs, and multiply the fontinfo and kerning directly without the aid of fontMath. |
it turns out one can use
fontMathufo2ft's TransformationsFilter to change the UPEM of a font.This could be useful if one wishes to increase (or even decrease) the resolution of the font design units.
E.g. merging one font with another with different unitsPerEm, or designing with a given unitsPerEm but then scale everything up to reduce rounding errors when generating intermediate instances.
I was thinking maybe such thing could become a ufo2ft preProcessor filter. And the compile functions could have an
unitsPerEm=None
option that, when set, would trigger this filter.It would compare the requested unitsPerEm with the UFO's current unitsPerEm and scale the output font accordingly to fit the desired UPEM.
Is this too niche or would this be something desirable to have?
The text was updated successfully, but these errors were encountered: