freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [PATCH v2] Improve FT_Outline_Embolden for the unintended


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] [PATCH v2] Improve FT_Outline_Embolden for the unintended artifacts problem (#45596).
Date: Mon, 8 Oct 2018 21:38:42 -0400

> I want to hear your opinion on this approach.

The original glyph shape is usually smooth: the contours have no
self-intersections. The emboldening might result in self-intersecting
contours. This is the main reason for majority of artifacts. You
already figured out that corners slide along bisectors, assuming
symmetric strength.x == strength.y. It is easy to see that self
intersections happen when a segment flips its orientation under
certain condition. This condition is easy to formulate but it involves
both corners at the segment termini and the length of the segment.
Nothing short of resolving these will work: such segments have to be
removed. To put it differently, the outline has to be simplified by
removing self-intersecting segments and replacing them with a point at
the intersection of the flanking segments. That is it and then you
apply emboldening cleanly.

The other issue is sharp corners that are left. The standard solution
for them is bevel or round join of lines in the emboldened outline.
This is totally separate.

I do not see other reasons for artifacts and very much doubt that any
easier solution exists. By the way, we has glyph stroker
https://www.freetype.org/freetype2/docs/reference/ft2-glyph_stroker.html.
This should be a sister algorithm, but it is implemented separately
with a bunch of trigonometry. I personally would love to have a single
FreeType module handle both, implemented using bisectors. So this is a
big project altogether: I would estimate at least 100 hours of
programing.



reply via email to

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