You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in hint.go line 671:
curDist := dotProduct(f26dot6(p.X-ref.X), f26dot6(p.Y-ref.Y), h.gs.dv)
as per the specifications:
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM05/Chap5.html#IP
I think the distance should be computed using the projection vector and not the
dual vector. (h.gs.pv instead of h.gs.dv)
correct line:
curDist := dotProduct(f26dot6(p.X-ref.X), f26dot6(p.Y-ref.Y), h.gs.pv)
The equivalent code in Freetype is:
distance = CUR_Func_project( CUR.zp1.cur + point,
CUR.zp0.cur + CUR.GS.rp0 );
Where CUR_Func_project use the projection vector:
return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy,
CUR.GS.projVector.x,
CUR.GS.projVector.y );
Original issue reported on code.google.com by jeremie....@gmail.com on 4 Nov 2014 at 1:38
The text was updated successfully, but these errors were encountered:
Thanks for the report. I think you're right.
Is there a particular font that there's a difference on, or were you simply
reading both the C code and the Go code?
Original comment by nigel...@golang.org on 6 Nov 2014 at 8:47
unfortunately, I'm just reading both code :/
It would be awesome to have full unit test coverage for hinting instructions
but this doesn't seems to exist (or is hard to find).
Original comment by jeremie....@gmail.com on 6 Nov 2014 at 10:09
Original issue reported on code.google.com by
jeremie....@gmail.com
on 4 Nov 2014 at 1:38The text was updated successfully, but these errors were encountered: