[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Rendering a filled contour inside an unfilled one
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Rendering a filled contour inside an unfilled one |
Date: |
Fri, 25 Jan 2013 18:35:56 +0100 (CET) |
> If the filled/unfilled nature is determined by the contour
> orientation, then how is it valid to provide the fill-rules, since
> they would subvert the determination of the filling by the
> orientation?
This is a good question, and I must admit that I don't understand the
code. Apparently, the filling rules are connected. Have a look at
the function `gray_hline' in src/smooth/ftgrays.c, which adjusts the
`coverage' dependent on the fill rule.
> I seem to have read that the FF code isn't robust in case of
> tangencies etc -- is that wrong? I'm personally looking at a more
> formalized polished solution based on:
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Boolean_set_operations_2/Chapter_main.html#Subsection_19.4.3
Using polygons only, tangents aren't an issue, AFAIK, and if you use
the FontForge's `--enable-real=double' configure option (which is now
the default). The problem is rather grazing intersections of third
order Bézier curves which are very hard to tackle. Have a look at
this web page:
http://www.truetex.com/bezint.htm
Werner