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

[spec] Clarify how multiple GlyphClassDef statements are handled #967

Open
khaledhosny opened this issue Sep 23, 2019 · 2 comments
Open
Labels

Comments

@khaledhosny
Copy link
Collaborator

The feature files specification is silent on multiple GlyphClassDef statements. In makeotfexe, the last one overrides all the preceding ones, while in feaLib it is cumulative.

The following file:

table GDEF {
    GlyphClassDef [a], [b], [c], [d];
    GlyphClassDef [e], [f], [g], [h];
    GlyphClassDef [i], [j], [k], [l];
} GDEF;

Produces the following with makeotfexe:

  <GDEF>
    <Version value="0x00010000"/>
    <GlyphClassDef Format="1">
      <ClassDef glyph="i" class="1"/>
      <ClassDef glyph="j" class="2"/>
      <ClassDef glyph="k" class="3"/>
      <ClassDef glyph="l" class="4"/>
    </GlyphClassDef>
  </GDEF>

and the following feaLib:

  <GDEF>
    <Version value="0x00010000"/>
    <GlyphClassDef Format="1">
      <ClassDef glyph="a" class="1"/>
      <ClassDef glyph="b" class="2"/>
      <ClassDef glyph="c" class="3"/>
      <ClassDef glyph="d" class="4"/>
      <ClassDef glyph="e" class="1"/>
      <ClassDef glyph="f" class="2"/>
      <ClassDef glyph="g" class="3"/>
      <ClassDef glyph="h" class="4"/>
      <ClassDef glyph="i" class="1"/>
      <ClassDef glyph="j" class="2"/>
      <ClassDef glyph="k" class="3"/>
      <ClassDef glyph="l" class="4"/>
    </GlyphClassDef>
  </GDEF>
@anthrotype
Copy link
Member

I like cumulative. It is in line with the way multiple feature blocks are treated as one, allowing to merge multiple feature files with include statements.

@readroberts readroberts self-assigned this Oct 1, 2019
@readroberts
Copy link
Contributor

I like cumulative as well. I vote for fixing the spec, and changing makeotf.

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

No branches or pull requests

3 participants