Skip to content

[missing_small_caps_glyphs] is Just Wrong #4919

@simoncozens

Description

@simoncozens

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions