Hacker News new | ask | show | jobs
by crazygringo 2093 days ago
Really cool article.

But over the past few years/decades, as glyphs have exploded in number, I've been finding myself wanting a totally different system of font definition.

I want fonts to be made out of just a handful (at a minimum) of primitives -- e.g. here's a vertical stroke, a horizontal stroke, diagonal strokes, what various serif endings look like, here are what the bowls of letters look like, etc.

An entire Latin alphabet can easily be extrapolated from that -- but also Cyrillic, for example. And then you can go further, and specify elements used only in Greek, and so on...

But the idea being that there's a "default", boring, generic universal font template that covers all glyphs. And that a type designer simply modifies parameters as desired.

Now the designer can go as far as they want, with individual glyph adjustments overriding the automatically-generated ones, custom kerning pairs and whatnot.

But the benefit would be that, even if they don't, then for a Latin alphabet you already get Cyrillic, Greek, Arabic, Chinese, Japanese, etc. characters that match well (in x-height, stroke width, etc. as needed).

The more I work with typography, the more I think static font outlines for each glyph are the wrong way to represent things. Smart parametized outlines are what we need.

8 comments

> I want fonts to be made out of just a handful (at a minimum) of primitives ...

> the idea being that there's a "default", boring, generic universal font template that covers all glyphs

> a type designer simply modifies parameters

Have you looked through the Unicode code charts lately and really thought about how many primitives you'd need in order to create glyphs not just for Latin/Cyrillic/Greek, but also for Arabic, Telugu, Thai, Lao, Javanese, Mongolian, etc., etc.? Never mind the miscellaneous symbols and dingbats, and the ever-growing collection of emoji....

I don't think this is a realistic proposition.

Within a closely-related group of scripts -- like Latin/Cyrillic/Greek -- and within a constrained range of styles, yes, it's possible: e.g., see Knuth's METAFONT and the various font families that have been created with it.

But if you want to do the traditional thing (design a separate glyph for every code point), isn't that still a similar amount of work?

I'm not that deep into designing typefaces, but I'd expect that many designer already work in a similar mode like GP suggested. The only difference is that you'd encode the ruleset instead of the outcome.

https://en.wikipedia.org/wiki/Computer_Modern:

The most unusual characteristic of Computer Modern, however, is the fact that it is a complete type family designed with Knuth's Metafont system, one of the few typefaces developed in this way. The Computer Modern source files are governed by 62 distinct parameters, controlling the widths and heights of various elements, the presence of serifs or old-style numerals, whether dots such as the dot on the "i" are square or rounded, and the degree of "superness" in the bowls of lowercase letters such as "g" and "o". This allows Metafont designs to be processed in unusual ways; Knuth has shown effects such as morphing in demonstrations, where one font slowly transitions into another over the course of a text. While it attracted attention for the concept, Metafont has been used by few other font designers; by 1996 Knuth commented "asking an artist to become enough of a mathematician to understand how to write a font with 60 parameters is too much" while digital-period font designer Jonathan Hoefler commented in 2015 that "Knuth's idea that letters start with skeletal forms is flawed".

For a small sample of font source code, see https://en.wikipedia.org/wiki/Metafont

Edit: for an idea about what variants can be generated, see https://s3-us-west-2.amazonaws.com/visiblelanguage/pdf/16.1/....

https://en.wikipedia.org/wiki/Multiple_master_fonts and https://en.wikipedia.org/wiki/Variable_fonts are younger, but also don’t quite work. It’s very hard/not really possible to design parametrized fonts that look well across wide parameter ranges.

Yes -- I think Knuth's work is a great first draft of this.

In my mind, however, the concept is less about providing parameter values (like Computer Modern), but more about actually drawing the parts. In other words it's less about variable/multiple masters, but "here's what the end of a vertical serif looks like at this weight", "here's what a full vertical stem looks like". (Though if you're extrapolating from Latin to Arabic where virtually nothing is in common, then it might be closer to a multiple masters situation.)

Maybe it's too hard to do, I can't be sure. But I've also seen deep neural-network-generated fonts posted here that have intrigued me... and even if it's too hard to simply "assemble" fonts from pieces and get a good result, I can't help but wonder if deep learning applied to 10,000's of typefaces couldn't be a tool in making that happen effectively.

How are you going to address the fact that the same letter (even in the Latin alphabet) can have wildly different outlines? Just look at the character "a": some are circular, others have the "hook" over it. Or the "&": some are more like a continuous stroke, others spell "et".
More parameters -- enumerated ones rather than real-valued ones.

The "two-story" "a" is default, but set a bit to choose the single-story version. Similarly with a lowercase "g" and so on.

(And of course plenty of existing fonts already give variants for these kinds of things too -- so the user could even still choose an alternate one, even if the font designer never designed it!)

Have you looked into Prototypo [1] before?

I was about to suggest you try it, but I just went on the website and it seems it has been sunsetted, which is a shame. It was a very interesting idea — you could create your own fonts by changing sliders which would change all the different features of the font.

I backed their Kickstarter project [2] in 2014, but never really used it after their development builds. I suppose I imagined myself being able to design all these different typefaces, but when I was actually given the ability to, I preferred to stick to ones other people had created.

[1] https://www.prototypo.io/ [2] https://www.kickstarter.com/projects/prototypoapp/prototypo-...

Also, here's a video from Adobe MAX 2015 where they show off a similar tool (called Project Faces) on an iPad. [1] As far as I know it never actually got released, though…?

[1] https://www.youtube.com/watch?v=bcUo9ULvVq4

> I want fonts to be made out of just a handful (at a minimum) of primitives -- e.g. here's a vertical stroke, a horizontal stroke, diagonal strokes, what various serif endings look like, here are what the bowls of letters look like, etc.

Tom7, who makes excellent videos about computers, has one about splitting letters up to create anagrams in this way.[0]

All of his videos are technically astounding, like the one where he frankensteined a raspberry pi into a game cartridge to play SNES games on a NES, or the one where he designed and built a computer using IEEE 754 NaN and infinity instead of 0 and 1.

[0] https://www.youtube.com/watch?v=qTBAW-Eh0tM

Glyphs (the font authoring app for macOS) supports this workflow via their Smart Components feature. [1] The resulting outlines are "baked" when you build the final font, so this is a "compile time" feature, but the principle is the same. With variable fonts, you can get even interpolation between resulting forms "at run time".

[1]: https://glyphsapp.com/tutorials/smart-components

You might want to look into Recursive which is probably the closest thing to what you describe. https://www.recursive.design/
Has anyone tried a machine learning approach to glyph generation?