Metafont (1984)
tug.ctan.org
tug.ctan.org
That's the best very-quick introduction today to the basic ideas behind Metafont I think, and the best less-short one is Knuth's “The Concept of a Meta-Font” (1982) — this 25-page paper (in large font so it's really not very long) is IMO not just a great read but a brilliant performance (https://s3-us-west-2.amazonaws.com/visiblelanguage/pdf/16.1/...)
BTW the submitted link here goes to the “raw” .web source code of the METAFONT program, but that was meant to be read in typeset form: http://texdoc.net/texmf-dist/doc/generic/knuth/mf/mf.pdf
I'd also note that while TeX is primarily the work of Knuth, MF was more of a collaboration between Knuth and his grad student John Hobby (who also wrote MetaPost) and Hobby should be recognized as a co-author of MF.
Neenie Billawalla was an important figure in the development of MF as well. She created the calligraphic uppercase letters in the CM math set and the Pandora typeface which was, as I recall, the first non-CM type family created using MF84 (Euler Math predates it, but iirc was created using MF79 and didn't take advantage of the parameterization capable with MF so each size was separately digitized). I'm sure there were other important figures in the development of MF and the surrounding technologies back in the 80s, and I apologize if I've left anyone out.
At the time, the idea that a type designer would use a computer as part of the design process (or even at all) was pretty radical. And the notion that you were expected to design a parameterized version of your font, that would produce both regular and bold, in any point size, from a single source where you specified control point coordinates with multiple linear equations in multiple unknowns, was also a challenge. (And, no, it isn't acceptable to do that algorithmically.)
Ultimately, the biggest impediment seemed to be Metafont's "stroke with a brush" model was at odds with how designers lived in an "outline" world. The combination of this calligraphic orientation on top of needing to be comfortable with linear algebra and computer programming, account for Metafont's lack of popularity, I believe.
(And for those not in the know, David also created the DVI format.)
(1) You specify control points on the outline, not outside (as with Bezier curves). That's something Peter Karow already did with Ikarus, but it didn't prevail.
(2) You write programs. Obviously that was a non-starter for the type-designer profession, which is much more programming friendly today, but back then it wasn't.
Oh, and read up on the "hinting" mechanisms in Metafont, it's lightyears ahead of Type 1 hints and TrueType instructions.
Obviously, today it's long in the tooth: 128 glyphs are way to few, the fact that it creates bitmap fonts is en vogue, either.
Still, a fantastic tool from which you can still learn a lot.
To be fair, the language Metafont defines the font in vector format, but computers at the time weren't fast enough to interpret metafont on the fly generating the fonts, so in all metafont software until today there is this preprocessing part where you generate bitmap fonts.
I wonder if Metafont could be used today with new software which interprets Metafont code generating fonts on the fly. I read the Metafont book and all the programming capabilities appear very powerful and useful. Perhaps we could create fonts where there is variation each time a letter is printed, logos and symbols with more interactive behavior when it's compressed or stretched out...
Concerning bitmaps, it's ironic that window systems ultimately display bitmaps on the screen, yet they keep the pathway from font-outline to their character-bitmap cache internal. There's no way to tell MacOS, for instance, that you want to plug in your own provider, that it can call whenever it first wants the bitmap for a given font glyph at a given size. Too bad this API is hidden; it must exist internally in MacOS, Windows, etc.
It is really a nice approach, not only for typefaces but also for graphics in general there is the Metafont inspired MetaPost. [1]
> "You specify control points on the outline, not outside (as with Bezier curves)."
Metafont basically simulates tools like brush and broad nib pen. This is great for some typefaces but it surprisingly gets in the way for most punchcutting based typefaces. The shapes of most of these letters are just not easy to replicate with a brush or pen approach.
[1] Metafont minuscule f, MetaPost majuscule P, not a typo.
I was involved in a typesetting project in the 90s where I wrote a preprocessor which took 16-bit input (encoded using SJIS—Unicode was not yet widely adopted enough to be practical) and turned that into a stream of TeX code which handled font selection and character coding. It also handled allowing breaks between Kanji/Kana characters at allowable points (e.g., between two Kanji/Kana but not between Kanji/Kana and, say, a period).
There were some specialized extensions of TeX that were designed for CJK typesetting. With the rise of Unicode, this functionality became available in XeTeX.
The half-tone chapter is also quite cool.
Drawing characters/symbols on graph paper is helpful for being able to determine what points should be.
MF is a really nice language to work with. It's macro-based like TeX, but because it's not intertwining with text presentation, it doesn't feel as awkward as TeX programming does. Among other things, it's effectively an algebraic solver system.
Today, most of the use of these ideas is in drawing technical graphics. For instance, for his drawings Knuth uses MetaPost, which is very much like MetaFont but outputs vectors (there are some additions to take advantage of PostScript).
Another example of mp involves LuaTeX (briefly, TeX but where you can write in the scripting language Lua). The folks who have developed it have brought MetaPost in as a ready-made drawing library. See https://www.tug.org/TUGboat/tb29-3/tb93hagen-mplib.pdf for instance.
Finally, still another example of the use of these ideas is the stand alone graphics production program Asymptote https://en.wikipedia.org/wiki/Asymptote_(vector_graphics_lan... which aims to lift to 3D the algorithms that Knuth put into MetaFont to make beautiful curves. (I use this system.)
Another reason is magnify-ability, or zoom in-ability. Authors are annoyed when they produce a graphic, and then include it in a document, say expanded to 120% of its original size or shrunk to 75%, and it contains jaggie letters. Similarly, readers are annoyed to blow up a map and find that the town names are hard to read.
Still another is that one set of fonts will do for essentially all documents, so on your hard drive you don't need a set at 10 pts, another set at 11, etc. The space these take up is less of an issue than it used to be, but it is an administrative annoyance.
Another issue impacted me a lot since I put stuff up for download. You have to maintain a number of outputs for the dpi-ness of various output devices, so that people reading on a screen use a different output file than people using a printer. In addition, Knuth has settings called things like blacker to tune the output for the physical output device engine, so you may want to maintain output file versions tuned for a number of different vendor's devices. Besides, at some point printers just became vector devices.
Basically, the market has spoken.
And perhaps it would be possible to make a vector-outputting version, if this has already been done for MetaPost.
Letter & Spirit opens by describing a dialog between Knuth and Douglas Hofstadter ("Metafont, Mathematics, and Metaphysics"). For Hofstadter's essay, see https://core.ac.uk/display/15352994 or chapter 13 (p.260 & fwd.) of Metamagical Themas (https://archive.org/details/metamagicalthema0000hofs/page/n9...).
There is also Dexter Sinister's "A Note on Type" (https://www.sternberg-press.com/product/notes-on-the-type-ti...).
All this suggests that Knuth's Metafont work has ended up being a successful provocation regarding how it is possible to encode creative design and visual language.
"Another piece of luck came my way in 1984, when I learned that the original bronze patterns used to make the molds of Monotype 8A were in San Francisco. For years I had been working with indirect and imprecise information about the fonts that had stimulated this work. First I had worked from photographic blowups of letterpress original pages from The Art of Computer Programming; then Richard Southall had prepared enlargements from original proofs he had located in England. At last I found the actual 80-year-old patterns that had generated the metal type. The present owner of these patters, Mr. Othmar Peters, kindly consented to let me borrow them while I was preparing the final draft of Computer Modern, and I learned much by measuring them with calipers."
(I also like the book for a much simpler reason: it got me my Knuth cheque)
Then short prose every now and then: https://www.2uo.de/image1.jpeg
But it's mostly the listings you can see on CTAN, as well. I actually misremembered and thought there was more explanation in the book.
What's really nice is that all glyphs are shown on a grid, next to their programs:
https://en.m.wikipedia.org/wiki/Literate_programming
Volume B is the code for TeX.