Skip to content

Attempt to fix non-deterministic GSUB compilation#1573

Merged
anthrotype merged 1 commit into
mainfrom
fix-gsub-indeterminism
Jul 23, 2025
Merged

Attempt to fix non-deterministic GSUB compilation#1573
anthrotype merged 1 commit into
mainfrom
fix-gsub-indeterminism

Conversation

@anthrotype

Copy link
Copy Markdown
Member

Trying to fix #1568

not 100% sure of these changes yet, but at least I can get fontc to produce the same GSUB when run multiple times.

I'm using Playfair.glyphspackage for testing and comparing against glyphsLib.

@anthrotype anthrotype force-pushed the fix-gsub-indeterminism branch from 0da84f3 to 120cc17 Compare July 23, 2025 12:01
@anthrotype anthrotype marked this pull request as draft July 23, 2025 12:02
@anthrotype anthrotype force-pushed the fix-gsub-indeterminism branch from 120cc17 to b67baa8 Compare July 23, 2025 12:49
This ensures we produces the same GSUB FeatureVariations output across builds. Doesn't match 100% glyphsLib yet, at least for Playfair.glyphspackage, I still see a lot of ttx diffs in GSUB...
But it's an improvement in the sense that fontc's own output is now stable.

[align_bracket_layers] minor: move getting master layer outside of the loop

prefer using IndexMap/IndexSet to HashMap/HashSet + sorting

wip
@anthrotype anthrotype force-pushed the fix-gsub-indeterminism branch from b23dad1 to d7218a9 Compare July 23, 2025 17:24
@anthrotype anthrotype marked this pull request as ready for review July 23, 2025 17:26

@cmyr cmyr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@anthrotype anthrotype added this pull request to the merge queue Jul 23, 2025
Merged via the queue into main with commit 6627d61 Jul 23, 2025
12 checks passed
@anthrotype anthrotype deleted the fix-gsub-indeterminism branch July 23, 2025 17:30
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.

non-deterministic GSUB compilation

2 participants