4 ms·
Can't you do the same with svg though ?
by foobar_ 7y ago
Can't you do the same with svg though ?
- shawnz 7y agoOr TTF? Aren't all font formats programmable?
- necovek 7y agoTruetype fonts "on their own" aren't, but they do contain a hinting table which allows one to define "hints" which will reposition curve points based on pixel grid they are being rendered in (a bit simplified). But no, you can't have multiple weights defined in the truetype format, though certain source font formats surely have them and can generate multiple TTFs. METAFONT is the ultimate fonts-with-code type system, but I am not sure if non-bitmap font generation tooling has moved away from METAPOST (haven't looked at it in years). FontForge is scriptable as well, but does not have some of the niceties of MF (like equations which get resolved if possible).
- csande17 7y agoOpenType has an extension that allows you to define multiple weights. It doesn't seem nearly as powerful as METAFONT, though; you can just specify a set of offsets to apply to each point in each letter shape: https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview#variation-space-default-instances-and-adjustment-deltas https://docs.microsoft.com/en-us/typography/opentype/spec/ot...