Wrong outline orientation of mirrored sub-glyphs
Migrated from: [SAVANNAH-55499]
Anonymous reported:
Glyph outlines do not always match the FT_OUTLINE_REVERSE_FILL flag.
Case in point: The Monotype font "Arial Black" (version 5.23) glyph 64 (closing square bracket "]") is loaded by FT_Load_Glyph with a reverse outline direction, but FT_OUTLINE_REVERSE_FILL is not set.
Cursory examination of the glyph reveals that it is a composite glyph defined as the mirror image (scaled by (-1,1)) of glyph 62 (opening square bracket "]").
This suggests a systematical error in the composition of outlines when sub-glyphs are scaled with different signs in the X and Y direction, in that FT_Load_Glyph fails to revert the order of control points in such cases, as would be necessary to preserve the winding order.
Note that while simply flipping the FT_OUTLINE_REVERSE_FILL bit would appear to solve the case in point, it would not work for outlines composed of both mirrored and non-mirrored sub-glyphs.