Skip to content

[fea-rs] Warn on repeated language statements - #2234

Open
cmyr wants to merge 1 commit into
worktree-fea-rs-test-warningsfrom
fea-rs-warn-repeated-language
Open

cmyr wants to merge 1 commit into
worktree-fea-rs-test-warningsfrom
fea-rs-warn-repeated-language

Conversation

@cmyr

@cmyr cmyr commented Oct 9, 2026

Copy link
Copy Markdown
Member

When a feature block names the same script and language twice, the second statement is a no-op in fea-rs: only the first decides which default lookups the language gets. feaLib re-adds (or with exclude_dflt removes) them on each repeat since fonttools#4189, and makeotf rejects some repeats, so the same source can compile differently.

We keep our behaviour, but now warn at the repeated statement. It is our opinion that such statements are almost always user mistakes, and that feaLib should never have accepted them.

When a feature block names the same script and language twice, the
second statement is a no-op in fea-rs: only the first decides which
default lookups the language gets. feaLib re-adds (or with exclude_dflt
removes) them on each repeat since fonttools#4189, and makeotf rejects
some repeats, so the same source can compile differently.

We keep our behaviour, but now warn at the repeated statement. It is our
opinion that such statements are almost always user mistakes, and that
feaLib should never have accepted them.
@cmyr
cmyr force-pushed the fea-rs-warn-repeated-language branch from d410c73 to d977c3f Compare October 9, 2026 17:21

This branch has not been deployed

No deployments
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.

1 participant