With the exception of cmfi10.tfm
and cmmi5.tfm
, all the TFM files in the Computer Modern distribution have an extra 0x00 byte at the end, which makes them one byte longer than claimed by their first two bytes (their lf
integer). Incidentally(?), the two exceptions are newer files (they date from 1996-07-08 rather than 1992-08-10).
Why is this? Were the newer files generated by a different version of Metafont? The TFM specification in the tex.web
and mf.web
source code does not mention the extra 0x00.
When I compiled a version of TeX with ISO Pascal, I had to omit some end-of-file checks from the original WEB program, because they worked only if the extra 0x00 byte was present. Therefore my change file contains the following
@x
if eof(tfm_file) then abort;
for k:=np+1 to 7 do font_info[param_base[f]+k-1].sc:=0;
@y
{|eof(tfm_file)| is true after the last byte has been read}
for k:=np+1 to 7 do font_info[param_base[f]+k-1].sc:=0;
@z
Has any version of TeX had a problem with the extra 0x00 or its absence? I assume that every version has system-dependent changes in the file system interface anyway.
hexdump
oncmr10.tfm
, I don't see a00
final byte. How are you looking at the file?eof(fmt_file)
and reported "bad format" when reading thecmfi10.tfm
file. I would like to know whether to adapt the TFM file or the reading routine.