pdftex bug

Vincent Lefevre vincent at vinc17.net
Wed Sep 13 18:08:47 CEST 2023


On 2023-09-13 08:19:39 -0600, Nelson H. F. Beebe wrote:
> Nobert Preining observes:
> 
> >>  maybe the specification of type1 fonts requires a certain maximum precision.
> 
> I just checked p. 26 of the black-and-white covered Adobe Type 1 Font Format
> book, and found that it demands that coordinates lie in [-2000, +2000].
> 
> Thus, at most 11 bits (because 2**11 = 2048) are required to represent
> their precision, and David W. Matula's formula from
> 	
> 	The Base Conversion Theorem
> 	Proceedings of the American Mathematical Society 19(3) 716--723 June 1968
> 	https://doi.org/10.1090/s0002-9939-1968-0234908-9
> 
> which can be written in hoc like this
> 
> 	 func matula(p) { return ceil( p * log10(2) + 1 ) }
> 
> shows that at most 5 decimal digits are needed to recover the original
> binary value of a coordinate. That of course, does not count leading
> zeros, so the example of
> 
> 	/FontMatrix [0.000833333333333 0 0 0.000833333333333 0 0]
> 
> could have been shortened to
> 
> 	/FontMatrix [0.00083333 0 0 0.00083333 0 0]

Rounding errors tend to increase. So, the precision needed for the
inputs depends on the subsequent operations.

> Still, software should be able to correctly handle excess digits on
> input values.

It is not clear that the bug is due to excess digits.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the tex-live mailing list.