> 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. _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
