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

Add check for STAT table misplaced "Italic" strings #2863

Closed
davelab6 opened this issue May 1, 2020 · 4 comments
Closed

Add check for STAT table misplaced "Italic" strings #2863

davelab6 opened this issue May 1, 2020 · 4 comments
Assignees
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id P2 Important
Milestone

Comments

@davelab6
Copy link
Contributor

davelab6 commented May 1, 2020

Observed behaviour

IBM Plex VF in https://www.axis-praxis.org/samsa/ today has a bad STAT table, as the Weights have "Italic" in their style names.

Expected behaviour

FB should check that "Italic" should not be seen in a list of style names for the Weight axis.

Thanks @Lorp for pointing this out

@felipesanches felipesanches self-assigned this May 8, 2020
@felipesanches felipesanches added this to the 0.7.25 milestone May 8, 2020
@felipesanches felipesanches added the New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id label May 13, 2020
@felipesanches
Copy link
Collaborator

I'm adding this new check to the universal profile with the check-id com.google.fonts/check/STAT_strings

felipesanches added a commit to felipesanches/fontbakery that referenced this issue May 14, 2020
Check correctness of name table strings referenced by STAT table
(issue fonttools#2863)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue May 14, 2020
Check correctness of name table strings referenced by STAT table
(issue fonttools#2863)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue May 14, 2020
Check correctness of name table strings referenced by STAT table
(issue fonttools#2863)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue May 14, 2020
Check correctness of name table strings referenced by STAT table
(issue fonttools#2863)
felipesanches added a commit to felipesanches/fontbakery that referenced this issue May 14, 2020
Check correctness of name table strings referenced by STAT table
(issue fonttools#2863)
felipesanches added a commit that referenced this issue May 14, 2020
Check correctness of name table strings referenced by STAT table
(issue #2863)
@kontur
Copy link
Contributor

kontur commented May 18, 2020

For this VF with NEGA and wght and this ttx STAT table:

<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.9">

  <STAT>
    <Version value="0x00010001"/>
    <DesignAxisRecordSize value="8"/>
    <!-- DesignAxisCount=2 -->
    <DesignAxisRecord>
      <Axis index="0">
        <AxisTag value="wght"/>
        <AxisNameID value="256"/>  <!-- Weight -->
        <AxisOrdering value="0"/>
      </Axis>
      <Axis index="1">
        <AxisTag value="NEGA"/>
        <AxisNameID value="257"/>  <!-- Negative -->
        <AxisOrdering value="1"/>
      </Axis>
    </DesignAxisRecord>
    <!-- AxisValueCount=0 -->
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

</ttFont>

Fontbakery fails with:

 >> com.google.fonts/check/STAT_strings
    Check correctness of STAT table strings
    with fonts/signikavf/Signika[NEGA,wght].ttf

      Rationale:
      On the STAT table, the "Italic" keyword must not be used on AxisValues
      for variation axes other than 'ital'.

    * ERROR: Failed with AttributeError: 'NoneType' object has no attribute 'AxisValue'
           File "/Users/johannes/.pyenv/versions/3.7.6/envs/signika/lib/python3.7/site-packages/fontbakery/checkrunner.py", line 344, in _exec_check
             for sub_result in result:  # Might raise.
           File "/Users/johannes/.pyenv/versions/3.7.6/envs/signika/lib/python3.7/site-packages/fontbakery/profiles/universal.py", line 574, in com_google_fonts_check_STAT_strings
             for value in ttFont["STAT"].table.AxisValueArray.AxisValue:


    Result: ERROR

With fontbakery-0.7.26.dev1+g82e6790f

@kontur
Copy link
Contributor

kontur commented May 18, 2020

Happens in 0.7.25 as well.

@felipesanches
Copy link
Collaborator

For this VF with NEGA and wght and this ttx STAT table:

@kontur, whenever you're about to make a comment on a closed issue, please consider opening a new one instead (and reference the closed one for hyperlinking purposes). Otherwise we risk forgetting about your comment.

Is this still a problem for you? If so, please open a new issue so that we can track progress on a fix for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New check proposal We expect new check proposals to include a detailed rationale description and a suggested check-id P2 Important
Projects
None yet
Development

No branches or pull requests

3 participants