[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: bug in fontinst 1.801: rounding problems (was: duplicated ker nings)
- To: firstname.lastname@example.org
- Subject: RE: bug in fontinst 1.801: rounding problems (was: duplicated ker nings)
- From: Lars Hellström <Lars.Hellstrom@math.umu.se>
- Date: Mon, 5 Oct 1998 13:19:28 +0100 (MET)
- In-Reply-To: <21ED223BA921D21182F200104B751D88157B9D@bach.cs.depaul.edu>
Alan Jeffrey wrote:
>Gosh, what a remarkable bit of detective work, well done!
Actually, it was pure luck. I happend to be looking at that part of
fontinst, when a sudden "Waaaiiit a minute! What if ..." struck me. I might
have found the murder weapon, but the murderer is still to be caught.
>I guess the question is now what the fix is: peraps all generations of
>MAPFONT should go through the `divide by 8 multiply by 8 again' routine to
>make sure they're all rounded. This won't make any difference to dimens
>that have gone through the process, and will round others appropriately.
Actually, I would prefer it if scalings with a factor of 1000 were not made
at all. Not scaling uses less of TeX's memory and is most likely faster.
Vladimir Volovich wrote:
>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
Many of the metric commands requires a scaling factor. If you want to make
a glyph punctdash that is the same thing as emdash (latin.mtx does this),
you have to write
This is where the scaling sneaks in.
>Not all of us have access to present-day processors, you know.
As "present-day processors" was used, I believe the even the 68LC040 would
qualify with a margin. Its ancestor 68000 probably would not.
Finally, I would like to point out that we might also consider doing
scaling with some kind of multiple word arthimetic. To me, it seems like
% #1 is a \count register whose contents should be scaled.
% #2 is the scaling factor. I assume it is a valid TeX <number>,
% rather than a fontinst <integer expression>.
\divide \a_count 10000
\multiply \c_count 10000
\advance \b_count -\c_count
\multiply \a_count #2
\multiply \b_count #2
\multiply \a_count 10
\divide \b_count 1000 % One could do something fancier here, to
% achieve proper rounding rather than mere
\advance \a_count \b_count
would pretty much do the trick.