4 ms·
It should be noted that Metafont is also a popular system for creating fonts with code. It is even more meta than this because it's a language for creating font
by kccqzy 7y ago
It should be noted that Metafont is also a popular system for creating fonts with code. It is even more meta than this because it's a language for creating fonts with code.
When looking at exactly how glyphs are defined (see https://github.com/cmiscm/leonsans/blob/master/src/font/lower.js https://github.com/cmiscm/leonsans/blob/master/src/font/lowe...) it struck me as quite similar to reading raw SVG paths with plenty of magic numbers. It doesn't strike me as particularly "code"-like per se (more like an extremely limited DSL to describe data).
- userbinator 7y agoThe main page of the project says "The font is made with code, it has coordinate values of the drawing points for each type." Indeed, a list of point coordinates and types (on/off curve) is at the core of how every vector graphics format, including font files (which are not much more than collections --- glyphs --- of such graphics) is defined, so that's not saying much. The main difference with other font formats seems to be that this font is stroked and not filled, which enables a lot of the effects shown; but the "wave" effect is not hard to produce from any other font --- calculate intermediate points if desired, and then repeatedly rasterise using a time-varying random perturbation of each point.
- buckminster 7y agoStroked fonts aren't new of course. See Hershey fonts and plotter fonts in general for examples.
- xorcist 7y agoOr indeed Metafont.
- foobar_ 7y agoCan'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...
- svat 7y agoI upvoted this comment, but sadly I wouldn't call METAFONT a “popular” system. The number of people who have successfully created “true” meta-fonts as Knuth intended is tiny. Nevertheless, when used with skill it can be very satisfying, as in Knuth's paper that I can only describe as a performance (The Concept of a Meta-Font, https://s3-us-west-2.amazonaws.com/visiblelanguage/pdf/16.1/the-concept-of-a-meta-font.pdf https://s3-us-west-2.amazonaws.com/visiblelanguage/pdf/16.1/... ) See also A Punk Meta-Font (https://www.tug.org/TUGboat/tb09-2/tb21knut.pdf https://www.tug.org/TUGboat/tb09-2/tb21knut.pdf) where he describes waking up one morning with an idea to create a certain kind of font, going to the computer at 1pm, and basically being done by 4pm. It is interesting to see the ideas from METAFONT basically ignored and misinterpreted by most of the mainstream of type designers (despite people like Zapf, Bigelow, Holmes, Carter and Southall being involved with the Stanford typography project and helping Knuth refine Computer Modern), only to be slowly reintroduced decades later in new forms (variable fonts etc).
- svat 7y agoForgot to mention: this site https://www.metaflop.com/modulator https://www.metaflop.com/modulator ought to be better known, and I ought to remember to mention it every time I mention METAFONT. One great drawback of METAFONT, which held back (still does, but used to too) its adoption in the decades when we could have wonderful things built on it, is the lack of quick visual feedback. (The bigger one of course, is that most font designers don't want to describe their shapes with equations: they think in curves, not about curves.) As I understand it, the site is developed by a couple of enthusiasts and goes a long way to address that problem. At https://www.metaflop.com/modulator https://www.metaflop.com/modulator just adjust sliders to create a unique font (or get something random by clicking "flop it!", and then tweak it). You can even download the resulting font if you like it.
- fho 7y ago> a performance Yes it was ... bravo! (No really that was a fantastic read)