freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Re: [OpenType] Re: rounding bug in MS TT rasterizer


From: Werner LEMBERG
Subject: [ft-devel] Re: [OpenType] Re: rounding bug in MS TT rasterizer
Date: Sat, 01 Apr 2006 09:21:20 +0200 (CEST)

Greg,


thanks a lot for your answer!

> In the particular example below, the x value of point 25 is 9.5
> (608),

OK.

> and the interpolate instruction wants us to add 4.4978769 to it.

Hmm.  I get the value 4.4914966.  The locations of the involved points
right before the IP instruction are

  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]

  original x value of point 25: 884 (13.8125)                 [OX]


     C2 - C1               608
  -> ------- * (OX - O1) = --- * 278
     O2 - O1               588

Where's the difference?  In case there aren't differences, how do you
compute this term?

> With the 26.6 fixed point precision of the TrueType rasterizer,
> 4.4978769 is represented as 4.5.  When added to the 9.5 we get 14
> (896). Since we are rounding to half grid, the following MDAP rounds
> us to 14.5, which then gets DELTA'd to 13.5.

We do exactly the same.

> I don't consider this a bug nor incorrect, the TrueType hinting
> engine is consistent in how it deals with rounding and precision.

Well, there must be a problem before the IP instruction...


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]