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: Thu, 12 Apr 2012 23:03:03 -0400

On Tue, Apr 10, 2012 at 3:02 PM, Behdad Esfahbod <address@hidden> wrote:
> Humm.  The docs say:
>
>  /*    FT_OUTLINE_EVEN_ODD_FILL ::                                        */
>  /*      By default, outlines are filled using the non-zero winding rule. */
>  /*      If set to 1, the outline will be filled using the even-odd fill  */
>  /*      rule (only works with the smooth rasterizer).                    */
>
> This sounds wrong to me.  I'm fairly sure that FreeType by default does
> EVEN_ODD, not WINDING.

I think you are wrong here. Check out the line 1256 in
smooth/ftgrays.c and whereabouts.

>
>  /*                                                                       */
>  /*    FT_OUTLINE_REVERSE_FILL ::                                         */
>  /*      By default, outside contours of an outline are oriented in       */
>  /*      clock-wise direction, as defined in the TrueType specification.  */
>  /*      This flag is set if the outline uses the opposite direction      */
>  /*      (typically for Type~1 fonts).  This flag is ignored by the scan  */
>  /*      converter.                                                       */
>
> This is consistent with EVEN_ODD being the case, not WINDING.

Again, you are confused. It is true that the orientation is taken into
account in the WINDING rule only but it is not the same thing. When
you talk about fill to the right/left, you need to know the
orientation like in WINDING. But you can also talk about filling
inside or outside ignoring orientation altogether and EVEN_ODD comes
to mind. This is like apples and oranges.

Going back to FT_Outline_Get_Orientation, did you notice that the
function cannot possibly return FT_ORIENTATION_NONE? The returns are
conditioned not to be equal to NONE. The function is pretty broken.



reply via email to

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