freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] unexpected MIRP behaviour with pv*fv near 0


From: Jan Bruns
Subject: [ft-devel] unexpected MIRP behaviour with pv*fv near 0
Date: Tue, 6 Dec 2016 08:36:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0

Hallo.


Looks like I probably found a bug with FT engine.

The font used however seems to expect what FT does:





md5sum ../ttf-bitstream-vera/VeraMoIt.ttf

24f79382039ee733cbe32fd61e327885

ttdebug (FreeType) 2.5.2

ttdebug 36 28 ../ttf-bitstream-vera/VeraMoIt.ttf



g006f: ed  MIRP[mrB]        (0005 0000)0004 0005 0005 0005

rounding state      to grid
minimum distance    $0040 (1.0)
CVT cut-in          $0280 (10.0)
ref. points 0,1,2   4, 5, 7
freedom    ($05b0, $c041) (0.08887, -0.99603)
projection ($3f8e, $078c) (0.99304, 0.11792)

Control Value Table (CVT) data
  5C       178 (    2.78)


 idx orig. unscaled     orig. scaled      current scaled     tags
-----------------------------------------------------------------
  0  (  735, 1325) - (    643,   1159) - (    679,   1042) - PXY
  4  (  885, 1493) - (    774,   1306) - (    808,   1280) - PX


g006f: ed  MIRP[mrB]        (0005 0000)0004 0005 0005 0005

rp = rp0 = 4
p = 0

current distance vector (rp -p)
= (808-679, 1280-1042)
= (129, 238)

projected distance = 0.99304*129 +0.11792*238 = 156
this is near cvt_value 178
rounding to grid gives 192

this is the distance to reach, after the p is moved

FT moves p against the freedom vector by (-3, 36)
to (676, 1078).



new distance vector (rp -p)
= (808 -676, 1280-1078)
= (132, 202)

new projected distance
= 0.99304*132 +0.11792*202
= 155

This is far away from the value 192 that was to
be reached.




Because pv and fv are almost prependicular, but not
that precise that numerical precision must be the cause:

Moving p by (107,-1199), along the freedom vector
to ( 679+107,   1042-1199)
=  ( 786, -157)

would make the new distance vector (rp -p)
= (808 -786, 1280- -157)
= (22, 1437)

new projected distance
= 0.99304*22 +0.11792*1437
= 191 (near to the value 192 intended to reach)



The font however seems to expect what FT does.



Gruss

Jan Bruns






reply via email to

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