Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[missing_small_caps_glyphs] is Just Wrong #4919

Open
simoncozens opened this issue Dec 2, 2024 · 1 comment
Open

[missing_small_caps_glyphs] is Just Wrong #4919

simoncozens opened this issue Dec 2, 2024 · 1 comment

Comments

@simoncozens
Copy link
Collaborator

Fonts without small caps pass this check. Indeed, every font in the GF library passes this check.

Here's why:

smcp_glyphs = set()
for value in subtable.mapping.values():
if isinstance(value, list):
for v in value:
smcp_glyphs.add(v)
else:
smcp_glyphs.add(value)

For each lookup which corresponds to an smcp or c2sc feature, we gather a list of all the substituted glyphs (stuff on the right hand side of a sub ... by statement, e.g. a.sc).

missing = smcp_glyphs - set(ttFont.getGlyphNames())

And then from that set of substituted glyphs, we remove every glyph in the font.

The result is that, unsurprisingly, no glyphs are missing.

@felipesanches
Copy link
Collaborator

PR #4721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants