Skip to content

Union produces different contour order depending on platform #55

@madig

Description

@madig

Stumbled over this because fonts build on our build server (running Linux) produce differently ordered contours for a specific glyph which broke hinting. Can reproduce with two glyphs from Noto Sans Regular (NotoSansTest.ufo.zip). Running the following script on Linux and Windows will produce differently ordered contours:

import sys

import booleanOperations
import ufoLib2

u = ufoLib2.Font.open("NotoSansTest.ufo")

for g in u:
    if not g.contours:
        continue

    cs = [c for c in g.contours]
    g.clearContours()
    p = g.getPointPen()
    booleanOperations.union(cs, p)

if sys.platform == "win32":
    u.save("test-win.ufo")
else:
    u.save("test-lin.ufo")

Still drilling down to where this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions