[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Re: rounding bug in MS TT rasterizer
From: |
Werner LEMBERG |
Subject: |
[ft-devel] Re: rounding bug in MS TT rasterizer |
Date: |
Fri, 07 Apr 2006 08:00:05 +0200 (CEST) |
With the help of Greg Hitchcock from Microsoft I can now reproduce the
way how the MS rasterizer computes the IP operation. They use
*unscaled* values!
original x value of reference point 1: 606 ( 9.46875) [O1]
original x value of reference point 2: 1194 (18.65625) [O2]
current x value of reference point 1: 608 ( 9.5) [C1]
current x value of reference point 2: 1216 (19.00) [C2]
unscaled x value of reference point 1: 969 [U1]
unscaled x value of reference point 2: 1911 [U2]
original x value of point 25: 884 (13.8125) [OX]
unscaled x value of point 25: 1415 [UX]
We do this:
C2 - C1 608
-> ------- * (OX - O1) = --- * 278 -> 4.4914966
O2 - O1 588
The MS rasterizer does this:
C2 - C1 608
-> ------- * (UX - U1) = --- * 446 -> 4.4978769
U2 - U1 942
This is exactly the value Greg has reported.
David, can you incorporate this information into the bytecode
interpreter?
Looking through the various bytecode instructions, the following
commands might be affected similarly (this is, the computations use
original values which are rounded and/or scaled afterwards) -- this
information is based entirely on the available descriptions, searching
for some keywords. It is not based on knowledge :-)
GC
MD
MDRP
MIAP
MIRP
SDPVTL
SHC
SHP
SHZ
The descriptions of the above keywords in the Apple specification
mention `original outline'. On the other hand, only the description
of MDRP talks about the `original uninstructed outline' (as does the
description of `IP') -- so maybe only IP and MDRP have to be checked.
BTW, in the MS specification, the dual projection vector is set
`parallel to the points as they appeared in the original outline
before any grid-fitting took place'. This looks like another thing to
control...
Werner