[opentype/slant_direction] False positive FAILs under certain conditions.
Observed behaviour
I am working on a VF binary with two axes (slnt & wght).
- The
slntmin/dflt/max are -8/0/0 and thewghtmin/max are 100/800. - The default master in the VF is
slnt:0wght:100
When running check-googlefonts/typenetwork on the the binary, it fails this check.
When I set my default master to slnt:0 wght:400 it passes.
This means that the values obtained by the x_delta function when checking the outline profile in wght:100 reference glyphs is not returning True for slnt minValue < maxValue.
Expected behaviour
The check should pass (when settings are up-to-spec) regardless of the stem-widths of the default master.
Resources and steps needed to reproduce
The font I'm working on is propreitary so can't offer it here but can offer it via email for testing.
I'm using the latest FontBakery version (1.0.1) on macOS 15.3.2 using Python 3.9.6
There's a little bit more info on the P.R. for this check.
cc: @yanone
Hi @kalapi
I've stopped contracting for Google Fonts and also on an extensive summer break. Sorry that I can't help at the moment. If the x_delta function returns bad values that probably means that the outlines are not identical (other than slant), meaning that the highest and lowest points between the upright and slanted outlines are not identical.
The function is indeed brittle. Since it was implemented, Behdad has added various metrics to Fonttools which Fontquant uses, specifically the fontTools.pens.statisticsPen.StatisticsPen which calculates slant among other metrics. This should probably be used instead.
Otherwise please not that to my knowledge, Fontbakery is not actively developed anymore in favour of Fontspector, so the issue should be fixed over there if it exists.
on an extensive summer break
Thanks and have a restful break.