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

Improve rationale for [com.google.fonts/check/metadata/os2_weightclass] #2873

Closed
vv-monsalve opened this issue May 8, 2020 · 4 comments
Closed
Assignees
Milestone

Comments

@vv-monsalve
Copy link
Collaborator

vv-monsalve commented May 8, 2020

Splitting #2872 into individual Issues for each Fail

Observed behaviour

The Fail was reported after FB checks performed from DIspatcher. The message for the FAIL (below) doesn't offer a clear explanation of what could be the cause. The OS/2 usWeightClass value (300) is ok for the font.

FAIL
OS/2 usWeightClass (300:"Light") does not match weight specified at METADATA.pb (400:"Regular").
code mismatch

Expected behaviour

Having a more clear or explanatory rationale on what is happening and how to proceed.
Related to googlefonts/gftools#200

Resources and exact process needed to replicate

Link to the Dispatcher Fontbakery results
Link to Last Cl FB QA folder
Upstream https://github.com/vv-monsalve/Varta/tree/QA-VartaST

@m4rc1e
Copy link
Collaborator

m4rc1e commented May 11, 2020

We need to modify the metadata usWeightClass check for VFs. For static fonts, we expect each weightClass metadata value to be the same as the font. For VFs, we expect each weightClass value to be 400 or near 400.

This was discussed in the following issue, #2683

Apologies but I should've flagged this issue sooner. I have already updated gftools add-font

@vv-monsalve
Copy link
Collaborator Author

Thanks @m4rc1e. From what I see, the metadata on this project seems to match with what you mention there in your example. Thus I'd like some clarification.

This is the METADATA.pb of the FBD process

name: "Varta"
designer: "Joana Correia, Viktoriya Grabowska, Eben Sorkin"
license: "OFL"
category: "SANS_SERIF"
date_added: "2015-05-13"
fonts {
  name: "Varta"
  style: "normal"
  weight: 400      ----------------------------------- it is 400
  filename: "Varta[wght].ttf"
  post_script_name: "Varta-Light"
  full_name: "Varta Light"
  copyright: "Copyright 2019 The Varta Project Authors (https://github.com/SorkinType/Varta)"
}
subsets: "latin"
subsets: "latin-ext"
subsets: "menu"
subsets: "vietnamese"
axes {
  tag: "wght"
  min_value: 300.0
  max_value: 700.0
}

Should the Default Value be 400 in the fvar table?
I changed it to 300 after I got a Fail in the firsts CL FB checks. Would it be the check that would you modify? [com.google.fonts/check/usweightclass] (below)

fvar table

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

  <fvar>

    <!-- Weight -->
    <Axis>
      <AxisTag>wght</AxisTag>
      <Flags>0x0</Flags>
      <MinValue>300.0</MinValue>
      <DefaultValue>300.0</DefaultValue>
      <MaxValue>700.0</MaxValue>
      <AxisNameID>256</AxisNameID>
    </Axis>

    <!-- Light -->
    <NamedInstance flags="0x0" subfamilyNameID="257">
      <coord axis="wght" value="300.0"/>
    </NamedInstance>

    <!-- Regular -->
    <NamedInstance flags="0x0" subfamilyNameID="258">
      <coord axis="wght" value="400.0"/>
    </NamedInstance>

    <!-- SemiBold -->
    <NamedInstance flags="0x0" subfamilyNameID="259">
      <coord axis="wght" value="600.0"/>
    </NamedInstance>

    <!-- Bold -->
    <NamedInstance flags="0x0" subfamilyNameID="260">
      <coord axis="wght" value="700.0"/>
    </NamedInstance>
  </fvar>

</ttFont>

Previously reported fail

🔥 FAIL: Checking OS/2 usWeightClass.
  • com.google.fonts/check/usweightclass

  • 🔥 FAIL OS/2 usWeightClass expected value for 'Regular' is 400 but this font has 300.
    GlyphsApp users should set a Custom Parameter for 'Axis Location' in each master to ensure that the information is accurately built into variable fonts. [code: bad-value]

@m4rc1e
Copy link
Collaborator

m4rc1e commented May 12, 2020

Should the Default Value be 400 in the fvar table?

Nope. Keep the font as is.

Your setup looks good.

@vv-monsalve
Copy link
Collaborator Author

I see, ok I'll wait for the check to be solved then. Thanks @m4rc1e

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

No branches or pull requests

3 participants