bugThe FreeType Project - Bugs: bug #55499, Wrong outline orientation of...


bug #55499: Wrong outline orientation of mirrored sub-glyphs

Submitted by:  None
Submitted on:  Thu 17 Jan 2019 03:47:01 PM UTC  
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Confirmed Privacy:  Public
Assigned to:  Werner LEMBERG <wl> Open/Closed:  Open
Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 19 Jan 2019 04:44:25 PM UTC, comment #2: 

FT_OUTLINE_REVERSE_FILL should be set for each contour. Then the rasterizer could be updated to work even fro the composite glyphs with opposite orientations. This is not possible without breaking compatibility. Therefore the composite glyphs (and only them) should indeed reverse the point order accordingly.

This is such a hypothetical issue though.

Alexei Podtelezhnikov <podtelez>
Project Member
Fri 18 Jan 2019 12:14:32 PM UTC, comment #1: 

Thanks for the report.

AFAICS, this situation is not covered in the OpenType specification.  I've thus asked on the OpenType e-mail list for a clarification that I will then implement in FreeType.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 17 Jan 2019 03:47:01 PM UTC, original submission:  

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.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by podtelez (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-18 wl StatusNone => Confirmed
        Assigned toNone => wl

    Back to the top

    Powered by Savane 3.5