Hi.
+ det == 0 case:
+ i.x == i.y == 0, or
+ o.x == o.y == 0, or
+ abs( gradient i ) == abs( gradient o )
+
+ /* The shift vector is only calculated from the corner type segment.
+ Other points -- zero length segment, forward straight segment,
+ wrong forward and backward mixed straight segment -- use this
+ shift vector as it is. Note the "in.x * out.y - in.y * out.x".
+
+ wrong forward and backward mixed straight segment:
+ one of the causes of unintended artifact generation.
+ */
It's the segnemts of zero length.
The other problem is the worng frward-backward mixed straight segment (Bauhaus
'O'). This is abs( gradient i ) == abs (gradient o), or det == 0.
+ /* The large shift value creates a cross point, which appears
+ as one of the artifacts. The shift value limitation inhibits
+ the occurrence of artifacts. */
+ shift.x = FT_MAX( FT_MIN( shift.x, strength.x ), -strength.x );
+ shift.y = FT_MAX( FT_MIN( shift.y, strength.y ), -strength.y );
+
Maybe, it is threshold on the determinant. This inhibits the sarpen corner, and
the cross point artifacts.
On Thu, 4 Oct 2018 15:29:42 -0400, Alexei Podtelezhnikov <[email protected]>
wrote:
+ two coalition equation solution:
+ det = i.y * o.x - i.x * o.y , det != 0
+ shift.x = strength * ( i.x - o.x ) / det
+ shift.y = strength * ( i.y - o.y ) / det
So your algorithm is exactly the same as the one implemented
currently. The tricky part is how you deal with very short collapsing
segments, the segments of zero length, and your threshold on the
determinant. Can you please elaborate on that and explain why your
algorithm is superior?
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel