Skip to Content
Fonts & Encodings
book

Fonts & Encodings

by Yannis Haralambous
September 2007
Intermediate to advanced
1040 pages
31h 23m
English
O'Reilly Media, Inc.
Content preview from Fonts & Encodings

B.1. TFM

The TFM format (for "TEX font metrics") was defined in 1980 by Lyle Ramshaw, a student of Knuth, and remains today the only font format recognized by TEX. Only in recent years have extensions of TEX finally used other font formats: TrueType and OpenType.

TFM is a binary format, but there is a human-readable form called PL (for "property list"). In this book, we have adopted the principle of showing only the "humanized" form of a font format whenever it exists, provided that conversion from binary to legible format and vice versa can be done without loss of information.

To convert from TFM to PL, we have a tool: tftopl, written by Leonidas Guibas in 1978. When used in one of the following ways:

   tftopl cmr10 > cmr10.pl
   tftopl cmr10.tfm cmr10.pl

it will convert the font cmr10.tfm, wherever it is found on the disk, to the PL format and store this representation of the font in the file cmr10.pl in the current directory. This manipulation would be useless if the antidote did not exist: the opposite tool pltotf, which restores our font to its binary form. This tool is used as follows:

   pltotf cmr10
   pltotf cmr10.pl othername.tfm

In the first case, a file by the same name as the PL file and with extension .tfm will be created in the current directory, whereas in the second case we explicitly provide the names of these files.

The principle of the PL file syntax is very simple: there are expressions, which have the following form:

   (KEYWORD VALUE)

where KEYWORD is a keyword ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Unicode Explained

Unicode Explained

Jukka K. Korpela
Unicode Demystified

Unicode Demystified

Richard Gillam
Developing with PDF

Developing with PDF

Leonard Rosenthol

Publisher Resources

ISBN: 9780596102425Catalog PageErrata