Metafonts

(If you have never heard about Metafont before, you might be interested in reading the Wikipedia article before continuing with this post.) Metafont is very different from usual font editors, such as Fontlab or FontForge; in fact it is not an editor at all, but rather a compiler that takes program code as the input and outputs a font. To design with Metafont is much more similar to writing a computer program, than to draw a picture.

When I investigated possible ways to make my fonts, I quickly decided on Metafont. Not only is the concept of skeletons and drawing with pens an integral part of the Metafont language, I also found that this programming approach is especially well suited to the Tengwar script, because of all the regular and reappearing features. For example, I could write a function that produces a lúva (bowl), and then call this function from all the different tengwar. By editing this single function, the appearance of all tengwar is changed at once!

Donald Knuth chose the name Metafont to illustrate an important concept: the idea is that the metafont code should describe the abstract idea of how the glyphs are constructed (i.e. the “metafont”). In turn, how the actual drawing is made is controlled by a bunch of parameters. By changing a single parameter, you can at once, in a consistent manner, drastically change the appearance of all glyphs simultaneously, and thus generate many different actual fonts. A simple example could be to scale the glyphs horizontally. In the following picture, the first line demonstrates the effect of scaling the skeletons by the stated amounts. The pen then traces the skeletons after the scaling has been made. Note that the outcome of this is very different from the result you would get if you scaled the outlines of the standard font, as demonstrated in the second line. (Click on the picture for a PDF.)

Vertically stretched skeletons vs. outlinesNon-proportional scaling is usually regarded as a big typographical no-no, or at least something that should be done very carefully: beyond say 5%, the adverse effects of scaling on the outlines really begin to be noticeable. Scaling of the skeletons, on the other hand, is much more forgiving, in my opinion.

The regular and the bold version of Tengwar Telcontar are both generated from the same sources, but with different pens. Of course, there is nothing special with those two styles; they are both chosen from a two-dimensional continuum: the following picture shows examples of different pen proportions (again, click on the picture for a PDF version):

Test of different pens

Other thing that can be modified in Tengwar Telcontar include the length of ascenders and descenders, and the x-height. In fact, there is no theoretical limit to how  many parameters a Metafont programmer can choose to implement.

So, if Metafont is so great, how come it is so rarely used? Well, there are a couple of important drawbacks:

  • There exists no graphical editor. Metafont is a programming language; to define a glyph you will have to write code, and then compile it to see the graphical outcome. And if you’re not pleased, then go back and change the code, and recompile. Obviously, this design approach is not suitable for everyone.
  • The output from Metafont is a bitmap font. To make a font in a contemporary vector format, this bitmap font must be converted, either manually, or with an automatic tracer (such as AutoTrace or Potrace). The automatic conversion is absolutely usable, but generally some manual cleaning up is needed.

For these reasons, I would not recommend Metafont to an aspiring font creator, unless they have a background as a programmer. But if you do feel attracted by the concept of “programming” a font, you might be interested in this tutorial. (I personally did not use it to learn Metafont, but from what I have seen, it seems like a good place to start.)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: