Skip to content

[opentype/monospace] Ensure check works with monospace OTF fonts#5051

Merged
felipesanches merged 2 commits intofonttools:mainfrom
klim-type-foundry:fix/opentype-monospace-glyf
Oct 14, 2025
Merged

[opentype/monospace] Ensure check works with monospace OTF fonts#5051
felipesanches merged 2 commits intofonttools:mainfrom
klim-type-foundry:fix/opentype-monospace-glyf

Conversation

@PeterDekkers
Copy link
Copy Markdown
Contributor

@PeterDekkers PeterDekkers commented Oct 6, 2025

Description

Fixes #5040

The opentype/monospace returned an ERROR status for monospace OTF fonts. This is because it tries to access the glyf table, which does not exist. The only reason the glyf table is accessed is to get the glyph names. To enable this to work for OTF and TTF alike, I instead used the TTFont.getGlyphNames() method.

I tried to add a monospace OTF font to the unit tests, but unfortunately I couldn't find an open source monospace OTF that would pass all of the checks. Maybe someone can recommend a suitable OTF file to use?

Checklist

  • update CHANGELOG.md
  • wait for the tests to pass
  • request a review

@PeterDekkers PeterDekkers changed the title Ensure opentype/monospace works with monospace OTF fonts [opentype/monospace] Ensure check works with monospace OTF fonts Oct 6, 2025
@felipesanches
Copy link
Copy Markdown
Collaborator

felipesanches commented Oct 7, 2025

Can you please update CHANGLOG.md?

You can add an entry under a new section:

Upcoming release v1.1.1 (2025-Oct-?)

Changes to existing checks

On the OpenType profile

Here the raw markdown code:

## Upcoming release v1.1.1 (2025-Oct-?)
### Changes to existing checks
#### On the OpenType profile
  - **[check-id]**: something something (PR #5051)

@PeterDekkers
Copy link
Copy Markdown
Contributor Author

Thank you @felipesanches, I've updated CHANGELOG.md.

Also, I've just signed the Google CLA.

@felipesanches felipesanches merged commit 86c5338 into fonttools:main Oct 14, 2025
49 checks passed
@PeterDekkers PeterDekkers deleted the fix/opentype-monospace-glyf branch October 14, 2025 20:07
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/monospace] ERROR when checking OTFs

2 participants