fontFeatures icon indicating copy to clipboard operation
fontFeatures copied to clipboard

Empty GDEF table

Open ryanbugden opened this issue 1 year ago • 2 comments

The GDEF table seems to always be a series of empty lists. Is this intentional / any way to parse the full GDEF table?

Test code with Roboto:

from fontFeatures.ttLib import unparse
from fontTools.ttLib import TTFont

source = TTFont('/Users/Ryan/Downloads/Roboto/Roboto-Regular.ttf')
fea = unparse(source).asFea()
print(fea)

That code’s output:

languagesystem DFLT dflt;
languagesystem cyrl dflt;
languagesystem grek dflt;
languagesystem latn dflt;
languagesystem latn AZE;
languagesystem latn CRT;
languagesystem latn FRA;
languagesystem latn MOL;
languagesystem latn NAV;
languagesystem latn ROM;
languagesystem latn TRK;
table GDEF {
    GlyphClassDef [], [], [], [];
} GDEF;

@class1 = [acute ...

TXX output for Roboto:

  <GDEF>
    <Version value="0x00010002"/>
    <GlyphClassDef>
      <ClassDef glyph="A" class="1"/>
      <ClassDef glyph="AE" class="1"/>
      <ClassDef glyph="AEacute" class="1"/>
      <ClassDef glyph="Aacute" class="1"/>
      <ClassDef glyph="Abreve" class="1"/>
      ...

ryanbugden avatar Oct 21 '23 16:10 ryanbugden

Is maybe the issue here? https://github.com/simoncozens/fontFeatures/blob/d422f7f579537a01ad57d2e1f53ad2acbf3c18f5/fontFeatures/feaLib/FontFeatures.py#L179 Or somewhere with fontTools?

ryanbugden avatar Feb 21 '24 14:02 ryanbugden

GDEFUnparser does look strangely incomplete. I'll take a stab at it.

simoncozens avatar Feb 21 '24 14:02 simoncozens