[texhax] TFM format question

Doug McKenna doug at mathemaesthetics.com
Wed Apr 20 06:39:47 CEST 2011


I've been trying to understand the TFM (TeX Font Metric) file format, 
using tftopl to convert to a property list, and also peeking in at the 
raw binary data.  I thought I understood things until the following 
caught my attention.

The file at

 /usr/local/texlive/2010/texmf-dist/fonts/tfm/public/misc/manfnt.tfm

has a file header that declares (in the big-endian binary, in the first 
24 bytes) the range of character codes in the font to be between bc=33 
(begin char) and ec=127 (end char) (decimal).  But when one dumps the 
data with tftopl, the initial part is (with my added comments):

(FAMILY MANFNT)
(FACE O 352)
(CODINGSCHEME PI)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 5270036673)
(FONTDIMEN
   (SLANT R 0.0)
   (SPACE R 0.25867)
   (STRETCH R 0.121335)
   (SHRINK R 0.08089)
   (XHEIGHT R 0.0)
   (QUAD R 0.744009)
   (EXTRASPACE R 0.0)
   (PARAMETER D 8 R 0.1)
   )
(LIGTABLE
   (LABEL C T)
   (KRN C A R -0.0222225)
   (STOP)
   (LABEL C F)
   (KRN C O R -0.044444)
   (STOP)
   (LABEL O 72)
   (KRN O 73 R -0.0222225)
   (STOP)
   (LABEL O 74)
   (KRN O 75 R -0.044444)
   (STOP)
   (LABEL C j)
   (KRN C k R -0.020223)
   (STOP)
   (LABEL C l)
   (KRN C m R -0.040445)
   (STOP)
   (LABEL C q)
   (KRN C r R -0.018222)
   (STOP)
   (LABEL C s)
   (KRN C t R -0.036444)
   (STOP)
   (LABEL C 1)
   (KRN C 2 R -0.0227785)
   (STOP)
   (LABEL C 3)
   (KRN C 4 R -0.045555)
   (STOP)
   (LABEL O 136)
   (KRN O 137 R -0.018222)
   (STOP)
   (LABEL C e)
   (KRN C f R -0.036444)
   (STOP)
   (LABEL O 52)
   (KRN O 53 R -0.080902)
   (STOP)
   (LABEL O 54)
   (KRN O 55 R -0.161804)
   (STOP)
   (LABEL C D)
   (KRN C G R -0.016667)
   (STOP)
   (LABEL C H)
   (KRN C I R -0.033333)
   (STOP)
   (LABEL C U)
   (KRN C V R -0.066668)
   (STOP)
   (LABEL C W)
   (KRN C v R -0.133333)
   (STOP)
   )
(CHARACTER O 0            <-- What is this character?
   (CHARWD R 1.388893)
   (CHARHT R 0.75)
   )
(CHARACTER O 1            <-- What is this character?
   (CHARWD R 1.388888)
   (CHARHT R 0.697222)
   )
(CHARACTER O 2            <-- etc.
   (CHARWD R 1.388888)
   (CHARHT R 0.697222)
   )
(CHARACTER O 3
   (CHARWD R 1.388888)
   (CHARHT R 0.697222)
   )
(CHARACTER O 4
   (CHARWD R 1.388888)
   (CHARHT R 0.697222)
   )
(CHARACTER O 5
   (CHARWD R 1.388888)
   (CHARHT R 0.697222)
   )
(CHARACTER O 6
   (CHARWD R 0.583333)
   (CHARHT R 0.697222)
   )
(CHARACTER O 7
   (CHARWD R 0.583333)
   (CHARHT R 0.697222)
   )
(CHARACTER O 10
   (CHARWD R 0.583333)
   (CHARHT R 0.697222)
   )
... [etc.]

It's declaring characters 0, 1, ... 8 (and there's more), all with 
character codes less than 33.

So how can this be?  Are these extra spurious declarations that are 
forever ignored, because they're out of declared range?  Or am I missing 
something about the internal consistency of the format?  Is this an 
ancient vestigial file, built with an older tool with less strict rules?  
I've not seen this in other fonts I've dumped, but I've only tried it on 
a very few TFM files.

TIA,

Doug McKenna


More information about the texhax mailing list