Skip to content

feat(opentype): add fsselection_wws check#684

Open
felipesanches wants to merge 2 commits into
fonttools:mainfrom
felipesanches:feat/577-fsselection-wws
Open

feat(opentype): add fsselection_wws check#684
felipesanches wants to merge 2 commits into
fonttools:mainfrom
felipesanches:feat/577-fsselection-wws

Conversation

@felipesanches
Copy link
Copy Markdown
Contributor

@felipesanches felipesanches commented Mar 6, 2026

Summary

  • Add new opentype/fsselection_wws check to the OpenType profile
  • Warns when OS/2 fsSelection bit 8 (WWS) is inconsistent with the presence of name IDs 21/22 (WWS Family/Subfamily names)
  • Per the OpenType spec: if the font's naming is already WWS-conformant (no name IDs 21/22 needed), the WWS bit should be set; if name IDs 21/22 are present, the WWS bit should not be set
  • Includes rich Metadata::TableProblem on all warn results for machine-readable output
  • Includes Rust tests covering both passing and failing cases

Fixes #577

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 (4 new tests: 2 passing cases, 2 warning cases)
  • cargo fmt --all -- --check passes
  • cargo clippy -p fontspector-profile-opentype -- -D warnings passes

🤖 Generated with Claude Code

felipesanches and others added 2 commits March 6, 2026 14:12
Warn when OS/2 fsSelection bit 8 (WWS) is inconsistent with name
table entries. If name IDs 21/22 are absent (font naming is already
WWS-conformant), the WWS bit should be set. If name IDs 21/22 are
present, the WWS bit should not be set.

Fixes fonttools#577

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add rich Metadata::TableProblem to both warn Status results for
machine-readable output. Add 4 Rust tests covering all combinations:
- WWS bit set without name IDs 21/22 (pass)
- WWS bit unset with name IDs 21/22 (pass)
- WWS bit set with name IDs 21/22 (warn: wws-with-wws-names)
- WWS bit unset without name IDs 21/22 (warn: no-wws-without-wws-names)

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] check if fsSelection bit for WWS is set correctly

1 participant