freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [patch] emboldening rework v1


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] [patch] emboldening rework v1
Date: Wed, 18 Apr 2012 13:36:18 -0400

Werner et al.,

In the current incarnation, FT_Outline_Get_Orientation cannot possibly
return FT_ORIENTATION_NONE, in spite of what the documentation
suggests. The return values are simply conditioned as !=
FT_ORIENTATION_NONE.

FT_ORIENTATION_NONE is supposed to mean CANNOT BE DETERMINED, which is
easier said than done. Any contour has a well defined orientation as a
sign of the area it covers: plus or minus. It is only the degenerate
contours or the contours with self-intersections that can have zero
coverage area and, therefore, undetermined orientation.

When we talk about an outline as a collection of contours, things get
out of control very quickly, because to do a good job you have to
inspect the whole layout of contours. For example the orientations of
both contours is the same in "=" and different in "o". So we may rely
on EITHER the orientation of the contour with the largest area OR the
the sum of all contour areas.

So here is my simple suggestion. Return NONE when the orientation
according to the the largest contour is not the same as the
orientation according to the sum of all.

Thoughts? Once again, the current implementation is broken so it is
not like we need to care about backwards compatibility.

Alexei



reply via email to

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