freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] loss of precision in FT_Outline_Decompose


From: David Turner
Subject: Re: [ft-devel] loss of precision in FT_Outline_Decompose
Date: Tue, 16 Jul 2013 13:29:43 -0700




2013/7/16 Luiz Henrique de Figueiredo <address@hidden>
At two places in FT_Outline_Decompose there is a division by 2 that
loses one bit of precision. A client walking manually through the
contours of a glyph and mapping the control points to floats by
dividing by 64 and then doing any required midpoint calculation for
conics will get different results than one calling
FT_Outline_Decompose.

That is not very surprising, fixed-point and floating-point algorithms do not generate the exact same results in the general case :-)
 
I was doing some tests generating outlines of fonts and come upon this
because the .eps I generated were slightly different but gave
apparently the same image.

Is this loss of precision a problem or will it never be seen in an image?

It's a slight loss of precision for the sake of performance. As pointed out by Werner, the actual outline coordinates are scaled by either 64 or 1024, depending on context, to ensure this is not noticeable.
 
_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel


reply via email to

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