Skip to content

Better "duplicate location" error#1738

Merged
cmyr merged 2 commits into
mainfrom
better-duplicate-location
Nov 11, 2025
Merged

Better "duplicate location" error#1738
cmyr merged 2 commits into
mainfrom
better-duplicate-location

Conversation

@simoncozens

Copy link
Copy Markdown
Contributor

Before:

$ fontc test.glyphs
[2025-11-11T15:10:13.213365Z ThreadId(1) fontc ERROR] Invalid source glyph 'ga-ethiopic':
'duplicate location Normalized {wdth: 0.60, wght: 0.40}'

After:

$ fontc test.glyphs
[2025-11-11T15:12:28.375830Z ThreadId(1) fontc ERROR] Invalid source glyph 'ga-ethiopic':
'layer eb4070ae-ad02-46bb-9ea2-ac5b398e3b7c provided outline at wdth=100, wght=400
but an outline for this location was already defined'

@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.

hm, I do think you hit on something important here, which is that it would be nice to delegate more of the error details to the crates that know things about sources. I think ultimately I'd prefer to have the backend define its own error enum or something, but that's a more invasive change, so i'm happy to merge this if it concretely improves diagnostics.

@cmyr cmyr added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit c5d4571 Nov 11, 2025
12 checks passed
@cmyr cmyr deleted the better-duplicate-location branch November 11, 2025 16:59
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.

2 participants