Slashdot Mirror


Can You Create X11 Fonts With METAFONT?

Mike Hicks asks " The current state of fonts for XFree86 has been lamented many times by many people. The resolution and clarity of modern displays continues to get better, meaning that fonts designed for 75 and even 100 dpi are becoming small and unreadable. Not to mention the fact that many fonts are relatively poor -- many only have a single set of attributes. Most fonts that I come across are just normal, bold, or italic. It is very hard to find a new font set that has normal, bold, italic, and bold italic typefaces. Of course, a true Open Sourcerer would go out and make these fonts, but there are only a handful of font-creation utilities out there (and most of them are only good for bitmapped fonts). All seems nearly lost, but I re-discovered something this weekend. The METAFONT package was developed by Donald E. Knuth (et al) in the late 1970s in order to produce high-quality fonts for the Tau Epsilon Chi (TEX -- now you know why it sounds like `blech') typesetting system." Has anyone used METAFONT for the express purpose of creating fonts for X11? How did it work out?

"After reading through Knuth's 1979 book, TEX and METAFONT: New Directions in Typesetting, it seems to me that METAFONT would be a good way to produce new fonts for X Windows (and console and printing..). I'm not certain if it's possible to produce PostScript Type 1 fonts from METAFONT (some say it isn't possible, while the GNU Font Utils package seems to be a way to do it), it would still be possible to create a large number of bitmapped fonts for various point sizes and display resolutions.

Well, I -think- it's possible...

Has anyone ever done what I'm describing? I haven't had much luck deciphering the documentation I've been able to find. Granted, I haven't yet plunked down $50 for a copy of The METAFONTbook, but even that reference may not be of any use, as it probably predates any widespread use of X Windows."

1 of 7 comments (clear)

  1. Re: Longer answer: Yes, you can by SamHill · · Score: 4

    Long answer: no, unless there are tools for converting TeX/METAFONT fonts to Adobe Type 1 (not merely PostScript; Type 1 is a specially structured subset of PS) or TrueType. I haven't heard of any. It's more likely that there exist tools to make a set of bitmap (BDF/PCF) fonts from a METAFONT font, but that's not quite the same.

    I think you're missing the point. For X screen fonts, you don't want Type 1 PostScript or TrueType fonts, you want well-crafted bitmaps that have been designed for screen display. I don't know about your machine, but on my system, Type 1 and TrueType fonts (other than Microsoft's Web fonts, which were specifically designed for screen display) look awful. Only the bitmap fonts (and Microsoft Web fonts) are readable and acceptable for everyday use. I leave PostScript fonts to gv.

    The mf program translates METAFONT format (MF) source files into GF (font raster) and TFM (TeX Font Metrics) files; GF files must be processed by gftopk to produce PK (packed font raster) files. xmbdfed, however, can import PK or GF font files and produce BDF files.

    For a neat example of PK fonts in use as screen fonts, check out TeXmacs, which gives you a really nice looking WYSIWYG display (better than anything else I've ever seen running under X). TeXmacs uses fairly large font sizes, however; I'm not sure if you can get legible PK fonts at smaller sizes (for, say, a terminal window).

    (By the way, the Type 1 Utils are not GPLed, but are freely available for use or modification (provided you maintain the existing copyright notices), and can be found on Eddie Kohler's Web site. If you want Debian packages, an ancient (pre-Eddie) version is available from the main archives (t1utils), with the current version (t1utils-ek) available from this site (as source, unless you have a PowerPC machine).)