Closed drj11 closed 2 months ago
If you feel like sending a PR, I'll be happy to review it.
Otherwise, let me know, and I can spend some time trying to address the issue.
I will investigate and see how it goes. I suspect i'm really the only person who is troubled by this.
Should there be a blanket policy for requesting fields that, due to different versions of OpenType tables, might not exist? In this particular case i can use getattr
or hasattr
but maybe in general such fields should evaluate to None
? Then a genuinely missing attribute would mean either a typo in your code or that the library code predates the publication of a newer table.
has this check moved from check-universal
to check-googlefonts
? Hmm, i wonder how old my previous fontbakery was.
Note to self:
fontbakery check-googlefonts -c com.google.fonts/check/outline_alignment_miss ranalina.ttf
(NOTE: Please include the check-id in the issue's title.)
Observed behaviour
Is the OS/2 table has version number 1, the com.google.fonts/check/outline_alignment_miss has an ERROR:
Expected behaviour
Skip, or proceed with the check? I have a vague memory that this used to work, so maybe an older version didn't use the xHeight metrics and hence didn't need to go fishing around in the OS/2 table so much.
Can it avoid using the xHeight if it's not available?
Resources and steps needed to reproduce
It is a font file with a version 1 OS/2 table. I can provide such a font file, but the one i am currently investigation also induces other fontbakery ERRORs that would be a distraction at this time.
Discussion
Because of the experimental nature of some of my work, i have fonts with special characteristics that would ordinarily make them unsuitable for much work. I'm still interested in using fontbakery on these fonts, but you may not be.
So my question is, are you interested in me patching things so that checks continue to work (or are skipped) if the OS/2 version is too low?
(PS: you might be surprised at how well a font can work with a low version OS/2 table or even a missing one)