From d35067b0fe20818258b79139f3af9b97b0b9909f Mon Sep 17 00:00:00 2001 From: Peter Dekkers <425971+PeterDekkers@users.noreply.github.com> Date: Mon, 2 Feb 2026 10:44:39 +1300 Subject: [PATCH 1/2] Order anchors by name --- src/ufonormalizer/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ufonormalizer/__init__.py b/src/ufonormalizer/__init__.py index ee45a31..399dcbf 100644 --- a/src/ufonormalizer/__init__.py +++ b/src/ufonormalizer/__init__.py @@ -656,7 +656,7 @@ def normalizeGLIFString(text, glifPath=None, imageFileRef=None): else: _normalizeGlifOutlineFormat2(outline, writer) if glifVersion >= 2: - for anchor in anchors: + for anchor in sorted(anchors, key=lambda e: e.attrib.get("name", "")): _normalizeGlifAnchor(anchor, writer) if glifVersion >= 2: for guideline in guidelines: From 8a838c2980b23745d44a9c85c598049e41dadca9 Mon Sep 17 00:00:00 2001 From: Peter Dekkers <425971+PeterDekkers@users.noreply.github.com> Date: Tue, 3 Feb 2026 12:17:35 +1300 Subject: [PATCH 2/2] Update unit tests to check anchor ordering --- tests/data/glif/format2.glif | 1 + tests/test_ufonormalizer.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/data/glif/format2.glif b/tests/data/glif/format2.glif index 19cba54..fc3674f 100644 --- a/tests/data/glif/format2.glif +++ b/tests/data/glif/format2.glif @@ -24,6 +24,7 @@ + diff --git a/tests/test_ufonormalizer.py b/tests/test_ufonormalizer.py index b256e9f..00e9caa 100644 --- a/tests/test_ufonormalizer.py +++ b/tests/test_ufonormalizer.py @@ -95,6 +95,7 @@ +