Closed simoncozens closed 10 months ago
Oh, you'll need to regenerate the Pipfile.lock yourself since for some reason my environment was complaining about the install.
While I support using uharfbuzz to speed up drawing, I want to point out that TTFont.getGlyphSet
also takes a location
argument to support variable fonts.
Also, maybe make the draw-funcs a singleton, instead of creating for each instance.
This is great change, specially because of the speedup.
2. It gives you easy access to setting variations, and getting outlines with OT variations applied.
This in fact is possible with fontTools. You can pass location to font.getGlyphSet()
.
This uses uharfbuzz instead of fontTools to extract the glyph outlines. You'll want to do this for two reasons:
1) It's really fast. 2) It gives you easy access to setting variations, and getting outlines with OT variations applied.
This second point means that you can easily create a large number of "fonts" from a single variable font. I've decided to use normalised variation coords (-1..1 for each axis) since it's easier to generate these than to have to grovel through the fvar table for the appropriate user-space range.