[tex-k] Total number of words in pltotf
Hironobu Yamashita
h.y.acetaminophen at gmail.com
Sun Sep 10 06:17:07 CEST 2017
> When huge LIGKERN program is used like this (lklarge0.pl),
> https://gist.github.com/aminophen/c8b7c2bc3e0d28b11b365b7896bfebbb
>
> 'pltotf' does not complain about it but both 'tftopl' and 'tex'
> complains about the output TFM:
>
> $ pltotf lklarge0
> $ tftopl lklarge0 temp
> The first byte of the input file exceeds 127!
> Sorry, but I can't go on; are you sure this is a TFM?
> $ tex "\font\x=lklarge0 at 10pt\x A\bye"
> ! Font \x=lklarge0 at 10.0pt not loadable: Bad metric (TFM) file.
The problem seems specific to web2c implementation of pltotf.
In pltotf.web, we find
@!lf:0..32767; {the number of words in the entire \.{TFM} file}
however, web2c converts this into
short lf ;
This conversion mistakenly allows 'lf' to overflow, and it ends
up generating invalid TFM file. I hope the attached patch can
be safely applied to pltotf.ch.
Hironobu Yamashita
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20170910-pltotf-limit.patch
Type: application/octet-stream
Size: 917 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20170910/b346f8aa/attachment.obj>
More information about the tex-k
mailing list