Skip to content

Add check to ensure a base glyph isn't classified as a mark glyph in GDEF table #2877

@m4rc1e

Description

@m4rc1e

We pushed Hebo VF to production yesterday and a user reported that the comma and underscore are not working as intended, google/fonts#2453.

When I inspect the GDEF table, we can see that the "comma" is a class 3 aka a "Mark" glyph, https://docs.microsoft.com/en-us/typography/opentype/spec/gdef#glyph-class-definition-table

(venv) Marcs-Air:heebo marcfoley$ grep "comma" Heebo\[wght\].ttx
      <ClassDef glyph="comma" class="3"/>

When I inspect the source files, we can see a mark anchor exists in the comma.

Screenshot 2020-05-14 at 13 28 53

An _ denotes that this glyph is a mark glyph

To ensure that base glyphs are not classified as a mark glyph, we could raise a fail If a glyph has an advance width greater than 0 and it exists in the gdef.GlyphClassDef as class 3.

More than happy to submit a pr.

Metadata

Metadata

Assignees

Labels

New check proposalATTENTION: Please, report proposals on the Fontspector project instead!P2 Important

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions