News for hackers. Stuff that matters.
Re:Leon Sans, a geometric typeface made with code by foobar_ on Sunday September 01, 2019 @09:27PM (#20856114)
Can't you do the same with svg though ?
Re:Leon Sans, a geometric typeface made with code by shawnz on Monday September 02, 2019 @02:51AM (#20857223)
Or TTF? Aren't all font formats programmable?
Re:Leon Sans, a geometric typeface made with code by necovek on Monday September 02, 2019 @03:27AM (#20857358)
Truetype 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).

Re:Leon Sans, a geometric typeface made with code by csande17 on Monday September 02, 2019 @04:23AM (#20857566)
OpenType 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/ot...