Skip to content

Order anchors alphabetically#100

Draft
PeterDekkers wants to merge 2 commits into
unified-font-object:masterfrom
klim-type-foundry:feature/order-anchors
Draft

Order anchors alphabetically#100
PeterDekkers wants to merge 2 commits into
unified-font-object:masterfrom
klim-type-foundry:feature/order-anchors

Conversation

@PeterDekkers
Copy link
Copy Markdown

This change orders anchors alphabetically, by name. It also adjusts the unit tests to check this anchor ordering.

I'm not sure if this type of ordering follows the philosophy of ufoNormalizer, but in case it does, here is a PR that could be used.

Resolves #98.

@benkiel
Copy link
Copy Markdown
Contributor

benkiel commented Feb 4, 2026

Understand the issue, but concerned that this is a breaking change, anything that used the normalizer but didn't run through glyphs will get diffs with this change. Possible to put it behind a command line flag? If so, I'd be comfortable merging that.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 87.498% (+0.001%) from 87.497%
when pulling 8a838c2 on klim-type-foundry:feature/order-anchors
into 8190c3b on unified-font-object:master.

5 similar comments
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 87.498% (+0.001%) from 87.497%
when pulling 8a838c2 on klim-type-foundry:feature/order-anchors
into 8190c3b on unified-font-object:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 87.498% (+0.001%) from 87.497%
when pulling 8a838c2 on klim-type-foundry:feature/order-anchors
into 8190c3b on unified-font-object:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 87.498% (+0.001%) from 87.497%
when pulling 8a838c2 on klim-type-foundry:feature/order-anchors
into 8190c3b on unified-font-object:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 87.498% (+0.001%) from 87.497%
when pulling 8a838c2 on klim-type-foundry:feature/order-anchors
into 8190c3b on unified-font-object:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 87.498% (+0.001%) from 87.497%
when pulling 8a838c2 on klim-type-foundry:feature/order-anchors
into 8190c3b on unified-font-object:master.

@PeterDekkers
Copy link
Copy Markdown
Author

Okay, we will flesh this out a bit more, and look at putting this kind of functionality behind a Glyphs-specific flag. The ultimate goal here is to minimise UFO differences when going between Glyphs and UFO (e.g. RoboFont), and this PR was only part of the solution.

@PeterDekkers PeterDekkers marked this pull request as draft February 4, 2026 00:56
@typemytype
Copy link
Copy Markdown

also sort by anchor.x, anchor.y and anchor.color, in case there are multiple anchors with the same name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sort anchors alphabetically?

4 participants