Skip to content

feat(opentype): add STAT/no_duplicate_axis_values check#674

Open
felipesanches wants to merge 2 commits into
fonttools:mainfrom
felipesanches:feat/199-stat-no-duplicate-axis-values
Open

feat(opentype): add STAT/no_duplicate_axis_values check#674
felipesanches wants to merge 2 commits into
fonttools:mainfrom
felipesanches:feat/199-stat-no-duplicate-axis-values

Conversation

@felipesanches
Copy link
Copy Markdown
Contributor

@felipesanches felipesanches commented Mar 6, 2026

Summary

  • New check opentype/STAT/no_duplicate_axis_values that detects duplicate axis value entries in the STAT table
  • Supports all 4 axis value formats (Format1, Format2, Format3, Format4)
  • FAILs when two entries share the same axis index and value combination
  • Includes Metadata::TableProblem on all statuses
  • 3 tests: skip for no STAT, pass for well-formed variable font, fail for duplicate axis values

Closes #199

Note: This PR was generated by an AI agent (Claude) working under the guidance of @felipesanches, but submitted without human review. @felipesanches himself would still need to participate in the PR thread if he wants to contribute to the review.

Test plan

  • cargo build passes
  • cargo test passes (3 tests)
  • cargo fmt --all -- --check passes
  • cargo clippy -- -D warnings passes

felipesanches and others added 2 commits March 6, 2026 13:43
Detects duplicate axis value entries in the STAT table (same axis
index and value combination). Supports all 4 axis value formats.
Includes Metadata::TableProblem on all statuses.

Closes fonttools#199

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add test_fail_duplicate_axis_values that constructs a font with a STAT
table containing two Format1 entries with the same axis index and value,
verifying the check correctly emits a "duplicate-axis-value" failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

STAT check: no duplicate Axis Values

1 participant