googlefonts / glyphsLib

A bridge from Glyphs source files (.glyphs) to UFOs
Apache License 2.0
178 stars 51 forks source link

Question: Content of `designspace` rule `BRACKET. … ` looks overpopulated #909

Open clauseggers opened 1 year ago

clauseggers commented 1 year ago

This is either a qeustion or an issue, so bear with me. I’m looking at a designspace file generated by fontmake, and I’m seeing a lot of rules with ‘bracket switching’ – so far so good. The content however – all the <sub name="tshe-cy.smcp" with="tshe-cy.smcp.BRACKET.varAlt01"/> &c seems to have too many substitutions. The one for tshe-cy.smcp I just mentioned appears 84 times in the designspace

    <rule name="BRACKET.Optical size_410_500.Weight_601_900.Width_100_150">
      <conditionset>
        <condition name="Optical size" minimum="410" maximum="500"/>
        <condition name="Width" minimum="100" maximum="150"/>
        <condition name="Weight" minimum="601" maximum="900"/>
      </conditionset>
      <sub name="tshe-cy.smcp" with="tshe-cy.smcp.BRACKET.varAlt01"/>
…

and here’s another one

    <rule name="BRACKET.Optical size_60_65.Weight_360_900.Width_120_150">
      <conditionset>
        <condition name="Optical size" minimum="60" maximum="65"/>
        <condition name="Weight" minimum="360" maximum="900"/>
        <condition name="Width" minimum="120" maximum="150"/>
      </conditionset>
      <sub name="tshe-cy.smcp" with="tshe-cy.smcp.BRACKET.varAlt01"/>
…

Case is that tshe-cy.smcp only has one bracket layer for opsz.

Screenshot 2023-06-12 at 16 08 57

So are these rules global (in some way) or how does that work?