freetype
[Top][All Lists]
Advanced

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

Re: [ft] Rendering a filled contour inside an unfilled one


From: Shriramana Sharma
Subject: Re: [ft] Rendering a filled contour inside an unfilled one
Date: Thu, 24 Jan 2013 23:07:40 +0530

Hello and thanks for your reply.

On Thu, Jan 24, 2013 at 7:20 PM, Werner LEMBERG <address@hidden> wrote:
> For the smooth rasterizer, the *whole* outline is transformed into
> intersections with horizontal scan lines, then either the even/odd or
> the non-zero winding rule gets applied scanline by scanline, depending
> on the FT_OUTLINE_EVEN_ODD_FILL flag.

But isn't the filled/unfilled nature supposed to be determined by the
orientation of the contour? i.e. in TrueType CW=filled,CCW=unfilled
and in PostScript vice versa? I can understand that as a library you
would provide options for the user to choose either nonzero or evenodd
fills, but shouldn't there be a standard for achieving uniform display
across media, otherwise how would a font creator know how the final
outline is going to end up rendered?

>> I am trying to implement boolean operations on glyph contours, which
>> is why I ask.
>
> Please give an example.

Well I hope trying to write a module that removes self-overlaps of
outlines would be a valid candidate? It is an AND operation, but at
the same time, if we are to compute the interplay of the filled and
unfilled outlines we should also do some difference operations (which
I suppose would be AND NOT). So I need to know whether I am supposed
to categorically subtract each contour tagged "unfill" by the
orientation from the result of the previous outlines in storage order?
If the fillrules are to be used, then there is no guarantee that a
contour with a particular orientation demarcates an unfilled area. I
hope I am stating my problem clearly?

-- 
Shriramana Sharma



reply via email to

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