Skip to content

fix(check-api): treat fonts with empty fvar as static#669

Open
felipesanches wants to merge 1 commit intofonttools:mainfrom
felipesanches:fix/574-empty-fvar
Open

fix(check-api): treat fonts with empty fvar as static#669
felipesanches wants to merge 1 commit intofonttools:mainfrom
felipesanches:fix/574-empty-fvar

Conversation

@felipesanches
Copy link
Copy Markdown
Contributor

Summary

  • Fixes is_variable_font() to return false for fonts with an empty fvar table (no axes)
  • Some tools produce static TTFs with empty fvar tables for Office kerning compatibility
  • Previously these fonts were misidentified as variable, causing false FAILs in fsselection and mac_style checks
  • Includes 3 tests: static font, variable font, empty fvar font

Closes #574

Test plan

  • cargo test --workspace passes (107 tests, 0 failures)
  • cargo clippy --all -- -D warnings clean
  • cargo fmt --all -- --check clean

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.

🤖 Generated with Claude Code

Fonts with an empty fvar table (no axes) are an experimental technique
for Office kerning compatibility. Previously, is_variable_font() would
return true for these fonts because it only checked for the presence of
the fvar table. Now it also checks that the fvar has at least one axis.

This fixes false FAILs in the fsselection and mac_style checks.

Closes fonttools#574

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.

[opentype/fsselection] Static TTFs with empty fvar give bad-[STYLE] fail

1 participant