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

[TTX] Add AxisNameID value to AxisIndex as comment #3219

Open
davelab6 opened this issue Jul 20, 2023 · 0 comments
Open

[TTX] Add AxisNameID value to AxisIndex as comment #3219

davelab6 opened this issue Jul 20, 2023 · 0 comments

Comments

@davelab6
Copy link
Contributor

I have a 3 axis font, Weight Grade Roundness, per https://github.com/googlefonts/axisregistry, and reading the TTX of the STAT table, I see

  <STAT>
    <Version value="0x00010001"/>
    <DesignAxisRecordSize value="8"/>
    <!-- DesignAxisCount=3 -->
    <DesignAxisRecord>
      <Axis index="0">
        <AxisTag value="wght"/>
        <AxisNameID value="256"/>  <!-- Weight -->
        <AxisOrdering value="0"/>
      </Axis>
      <Axis index="1">
        <AxisTag value="GRAD"/>
        <AxisNameID value="257"/>  <!-- Grade -->
        <AxisOrdering value="1"/>
      </Axis>
      <Axis index="2">
        <AxisTag value="ROND"/>
        <AxisNameID value="268"/>  <!-- Roundness -->
        <AxisOrdering value="2"/>
      </Axis>
    </DesignAxisRecord>
    <!-- AxisValueCount=11 -->
    <AxisValueArray>
      <AxisValue index="0" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="259"/>  <!-- Thin -->
        <Value value="100.0"/>
      </AxisValue>
      <AxisValue index="1" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="260"/>  <!-- ExtraLight -->
        <Value value="200.0"/>
      </AxisValue>
      <AxisValue index="2" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="261"/>  <!-- Light -->
        <Value value="300.0"/>
      </AxisValue>
      <AxisValue index="3" Format="3">
        <AxisIndex value="0"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="2"/>  <!-- Regular -->
        <Value value="400.0"/>
        <LinkedValue value="700.0"/>
      </AxisValue>
      <AxisValue index="4" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="262"/>  <!-- Medium -->
        <Value value="500.0"/>
      </AxisValue>
      <AxisValue index="5" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="263"/>  <!-- SemiBold -->
        <Value value="600.0"/>
      </AxisValue>
      <AxisValue index="6" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="264"/>  <!-- Bold -->
        <Value value="700.0"/>
      </AxisValue>
      <AxisValue index="7" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="265"/>  <!-- ExtraBold -->
        <Value value="800.0"/>
      </AxisValue>
      <AxisValue index="8" Format="1">
        <AxisIndex value="0"/>
        <Flags value="0"/>
        <ValueNameID value="266"/>  <!-- Black -->
        <Value value="900.0"/>
      </AxisValue>
      <AxisValue index="9" Format="1">
        <AxisIndex value="1"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="267"/>  <!-- Normal -->
        <Value value="0.0"/>
      </AxisValue>
      <AxisValue index="10" Format="1">
        <AxisIndex value="2"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="269"/>  <!-- Default -->
        <Value value="0.0"/>
      </AxisValue>
    </AxisValueArray>
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

In the <AxisValue> records, it would be more readable for me to add the comment next to the <AxisNameID> elements near the top also to the <AxisIndex> elements later on, so I don't have to see the <AxisIndex> value and look it up in the <Axis> element value.

So eg that last one would go from

      <AxisValue index="10" Format="1">
        <AxisIndex value="2"/>
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="269"/>  <!-- Default -->
        <Value value="0.0"/>
      </AxisValue>

to

      <AxisValue index="10" Format="1">
        <AxisIndex value="2"/> <!-- Roundness -->
        <Flags value="2"/>  <!-- ElidableAxisValueName -->
        <ValueNameID value="269"/>  <!-- Default -->
        <Value value="0.0"/>
      </AxisValue>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant