fonttools / fontbakery

🧁 A font quality assurance tool for everyone
https://fontbakery.readthedocs.io
Apache License 2.0
534 stars 99 forks source link

TN usweightclass check: unclear error message & missing from html report #4694

Closed justinpenner closed 1 month ago

justinpenner commented 2 months ago

Observed behaviour

Problem 1

When I run the TN profile on a family with 9 weights (100–900) plus italics, the com.typenetwork/check/usweightclass check fails the Thin/Thin Italic fonts, and tells me I need multiple values '[100, 250]' for usWeightClass, which doesn't make any sense.

 >> com.typenetwork/check/usweightclass
    Checking OS/2 usWeightClass.
    with Ritualist-Thin.ttf

    Rationale:                                                                

    For Variable Fonts, it should be equal to default wght, for static ttfs,    
    Thin-Black can be 100-900 or 250-900, for static otfs, Thin-Black must be   
    250-900.                                                                    

    If static otfs are set lower than 250, text may appear blurry in legacy     
    Windows applications. Glyphsapp users can change the usWeightClass value    
    of an instance by adding a 'weightClass' customParameter.                   

    More info: https://github.com/fonttools/fontbakery/pull/4260

    FAIL OS/2 usWeightClass is '100' when it should be '[100, 250]'. [code:     
         bad-value]                                                             

    Result: FAIL

Problem 2

The same check com.typenetwork/check/usweightclass does not appear in the html report. It shows 2 fails in the summary, but they are nowhere to be found in the report.

image

report-typenetwork-static.html.txt

Expected behaviour

The check should appear in the html report, and it should give a clearer error message. I have no idea what needs to be changed in my fonts, in order to pass this check.

Resources and steps needed to reproduce

I'm running the latest Fontbakery 0.12.4. I can't share the fonts, but it doesn't seem like these issues would be specific to my fonts.

guidoferreyra commented 2 months ago

Hi Justin, thanks for reporting this. Problem 1 The error message says it can be one or the other but is not clear enough. Nevertheless, the check has a bug because the font you checked is correct. I will fix it. Thanks again.

Problem 2 Is related with another problem of FB https://github.com/fonttools/fontbakery/issues/4687

justinpenner commented 2 months ago

Thanks for the quick response. If there's anything else you need from me to help solve problem 2, let me know. It's not the first time I've noticed something appears in the Terminal log but is missing from the HTML report.