[Q] TFM files headers

Didier Verna didier at didierverna.net
Fri Sep 13 12:30:37 CEST 2019

"Taylor, P" <P.Taylor at rhul.ac.uk> wrote:

> Didier Verna wrote:
>>    I found at least one tfm file (from Adobe apparently) that seems
>>    to also seems to contain a couple of information strings[1], but
>>    contrary to a PARC header, the strings are not padded with 0s.
> Can you post the file, or a link to the file, please ?  If it was not
> generated using MetaFont or PLtoTF, it may not be compliant. Philip
> Taylor

  The file is pagd8y.tfm. It is attached below but it is also available
  in the TeX Live distribution (texmf-dist/fonts/tfm/adobe/ly1/).

  After the two standard header words (checksum / design size), there
  seems to be a PARC-like character coding scheme string of 31 bytes
  ("TeX typewriter and Windows ANSI"), properly advertised with its
  length in the first byte position, but this string isn't padded with
  0s until the 40th byte. Instead, it seems to be immediately followed
  by two other strings ("Y&Y Inc." and "AvantGarDem").

  AFAICT, this file could still be compliant with the TFM format. I
  think this format only mandates the two first header words, and an
  indication of the header's total length. But other than that, I think
  people are free to put whatever they want in the rest of the header.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pagd8y.tfm
Type: application/octet-stream
Size: 5104 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20190913/b9dccf78/attachment.obj>
-------------- next part --------------

PS: I'm currently testing the robustness of a TFM parser of mine on the
64323 tfm files in the TeX Live 2019 distribution, and there are *lots*
of non compliant (for real) files in there... in particular, many of
them have the wrong length, or min code > max code.

Resistance is futile. You will be jazzimilated.

Lisp, Jazz, Aïkido: http://www.didierverna.info

More information about the texhax mailing list