gero3 / facetype.js

typeface.js generator
http://gero3.github.io/facetype.js/
MIT License
664 stars 122 forks source link

Handle variable fonts #20

Open rememberlenny opened 5 years ago

rememberlenny commented 5 years ago

Currently when testing a variable font, the variable headers and instance tables are attributing unknownN as the key name. Variable fonts and their respective variable settings are not usable as a result.

The variable headings are in the font's Naming table (name), but show up as numbers - which are translating them into UnknownN values.

screen shot 2019-02-28 at 10 40 58 am

Currently the fonts fvar table is being dropped: https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6fvar.html

Ideally the fvar table should appear as a font object key.

Per: https://opentype.js.org/font-inspector.html

screen shot 2019-02-28 at 10 48 06 am

Testable variable font: https://github.com/TypeNetwork/Roboto-Delta

brianpeiris commented 3 years ago

For others' reference. If you're using three.js to render these fonts, you can use TextGeometry's bevel settings to effectively increase the weight of a rendered font.