Fonts4Fun - Modifying PostScript Fonts

This crazy font is actually a variation of the venerable cmbxti10.pfb TeX-font, which is available in PostScript Type1 format. I have only changed the movement, line, and curve parameters within the .pfb font file by some random numbers, using a simple awk script. The font metrics (.afm, .tfm files) are unchanged.

This font experiment is also a way to look a little bit into the architecture of a PostScript font.

The font modification is rather easy, once you have brought the font into a disassembled, readable ASCII form, e. g. by utilizing the tool t1disasm, which is publicly available. Here are the steps, with the cmbxti10 example:

The .src file is in PostScript font format, which is described by a set of documents available at The .src file is quite legible; there is actually only a small variety of movement and drawing commands, and each on a line by itself, so they can be easily parsed. There is a lot of hinting information (hstem, vstem) in the original font, which can be removed, as it has no use in such a crazy font.

How to tell the text processor to use the crazy font instead of the original one? The simplest way is to exchange the original PostScript font file by the crazy one. But this is generally a bad solution, as the font file contents then does not correspond to the font name any more, which is among technical points also a copyright issue: When changing a font, generally the font name must be changed.

The correct way would be to create a complete set of font files under a new name. But this is tedious, and too much work, if the crazy font is only used for some experimenting. With TeX/dvips it is much easier to do some temporary font mapping. Simply create a custom font mapping file, e. g. within the local directory used for these font experiments. You also need to enable this mapping file in the dvips configuration file Here is the required line in the file for the example font:

You can download a tar-file with a simple experimental setup for crazy font generation from here. This generates its own file, but the cmbxti10.pfb file is not included; use your local one. Tweaking the awk-script randit.awk brings an ever-changing variety of crazy fonts.

How does such a letter look in large scale? In the tar-file you find another awk script, which converts the PostScript source into a MetaPost file on a letter-by-letter basis. The MetaPost drawing distinguishes between straight lines (blue), curves (red), and closepath (black) commands. Here is an example of the letter B:

Letter B

Have fun!

This page first put online 29 December 2002.

Copyright © 2001 - 2017 by Hartmut Henkel

Last file change: 2002/12/29