fontbakery
fontbakery copied to clipboard
“Font is not italic” com.google.fonts/check/italic_angle
I am working on a single-style italic font. With fontbakery check-fontbureau
, I get
FAIL Font is not italic, so post.italicAngle should be
equal to zero. [code: non-zero-upright]
Even though the font is indeed italic, and the flags are set.
It took quite long for me to find out why Fontbakery is so convinced that the font is not italic, and how to change its mind: It refers to the file name! Of all things, this is what I would expect least.
-
If the file name contains “Regular”, it firmly believes the font is not italic, even if the flags and the italic angle inside the font consistently indicate that the font is italic. Resulting in a FAIL.
-
After re-naming the file to “…-Italic”, Fontbakery believes the font is italic but complains that “Name ID 17 (Typographic Subfamily Name) must contain ‘Italic’”, resulting in a FAIL.
-
If I simply strip the file name to the basic typeface name, without style indication, Fontbakery becomes unsure, and therefore more generous, and does not complain about the flags, italic angle or name IDs any more.
So much for that. Just rename the file to pass the tests.
Observed behaviour
(1) Fontbakery seems to infer from the file name whether a font is italic or not.
(2) It says “Font is not italic”, wrongly, and without indication why it thinks so.
Expected behaviour
(1) The file name should not be used for the definitive decision as to whether a font is to be considered italic, on which all other fails are based. To me personally, it is highly unexpected that the tool refers to the file name at all, and I think it shouldn’t.
(2) Instead of saying “Font is not italic”, without a reason, Fontbakery should point out what it really is: a mismatch between information in the flags, italic angle, name IDs, or file name, and leave it up to the font maker which of these to fix so as to eliminate the misnatch.
Resources and steps needed to reproduce
Sorry, I am not allowed to provide the font file.
yes! This is a known problem, as discussed last week at https://github.com/fonttools/fontbakery/issues/4349#issuecomment-1845445245
Thanks for pointing this out.
- If something is chosen as the “source of truth” then the subsequent fails should name this, otherwise the user will not understand.
- We don’t need any “source of truth” if we realise that the purpose of the tool (at least the checks in question) is to detect and report inconsistencies and mismatches, rather than decide which of the pieces of data is to be considered the error.