[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in fontinst 1.801: rounding problems (was: duplicated kernings)



"LH" == Lars Hellström writes:

 LH> Last night, I came across something which probably is where the
 LH> above rounding error occurs. Recall the following piece of code
 LH> in fontinst:

Thanks a lot! :-)

[...]
 LH> As we want to spot a small rounding error, we need to see exactly
 LH> what TeX's registers contain. In this case, TeX stores the
 LH> dimension 17.28pt as 1132462sp. Next, we do what \vpl_scale would
 LH> do, i.e.,

 LH> *\divide\dimen@ 8 \multiply\dimen@ 1000 \divide\dimen@ 1000
 LH> \multiply\dimen@ 8

it seems that adding a test into \vpl_scale whether the scale factor
is equal to 1000, and in such a case do nothing, will solve this
problem. Alan suggested to do this rounding each time, but it seems
that this will be enough? Because only scaling by 1000 leads to
rounding; only in this case the size of the original font and of the
scaled font may become different. In other cases, scaling the same
sizes by the same factor will (should) give the same result.

btw, why scaling with factor 1000 occurs in the first place? :-) it
was not requested in the test file which demonstrates a bug (and in ae
fonts too).

	Best regards, -- Vladimir.