freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] regarding freetype 2 cubic curve flattening


From: Werner LEMBERG
Subject: Re: [ft-devel] regarding freetype 2 cubic curve flattening
Date: Mon, 31 Oct 2011 07:42:58 +0100 (CET)

Hello Alexei, hello Vivek!


>> according to Hain's paper
>>
>>   dmax = (s/L) * dnorm ;
>>
>> here `s' is not normalized.  `dmax' is the tolerance for flatness
>> and `dnorm' is the normalized flatness of the curve.
>>
>> So
>>
>>   s_limit = (dmax / dnorm) * L ;
>>
>> by putting `dnorm = 0.75' we get the permissible height of the
>> control point for the curve not to be split.
>>
>> So should we not be comparing `s = abs(dy * dxi - dx * dyi)' with
>> `s_limit * L' instead of `s' and `s_limit' (because `s' is
>> perpendicular distance of control point multiplied by `L')?
>
> It is actually not just cross-product but
>
>   s = abs(dx * dxi - dx * dyi)  / L
>
> otherwise the dimensionality is wrong.
>
> Some Hain's equations just need to be creatively modified to avoid
> divisions in the code.

After resolving this issue I would be glad if someone could provide a
patch which improves the comments in the source code.


    Werner



reply via email to

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