Skip to content

[feaLib] raise FeatureLibError for a UnicodeRange bit outside 0-127 - #4266

Merged
anthrotype merged 1 commit into
fonttools:mainfrom
RavSinghChandan:fealib-unicoderange-bits
Oct 9, 2026
Merged

anthrotype merged 1 commit into
fonttools:mainfrom
RavSinghChandan:fealib-unicoderange-bits

Conversation

@RavSinghChandan

Copy link
Copy Markdown
Contributor

table OS/2 { UnicodeRange 0 200; } OS/2; was accepted by the parser and then failed when building, with a bare ValueError: expected 0 <= int <= 127, found: 200 from setUnicodeRanges and no line number.

The parser now checks each UnicodeRange bit and raises a FeatureLibError with the location, like other invalid values in a feature file. Added a parser test.

table OS/2 { UnicodeRange 200; } was accepted by the parser and then failed
when building, with a bare ValueError from setUnicodeRanges and no line
number.
@anthrotype
anthrotype merged commit 62696bb into fonttools:main Oct 9, 2026
13 checks passed
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