hhea
- com.google.fonts/check/caret_slope[source][source]
Check hhea.caretSlopeRise and hhea.caretSlopeRun
Rationale:
Checks whether hhea.caretSlopeRise and hhea.caretSlopeRun match with post.italicAngle.
For Upright fonts, you can set hhea.caretSlopeRise to 1 and hhea.caretSlopeRun to 0.
For Italic fonts, you can set hhea.caretSlopeRise to head.unitsPerEm and calculate hhea.caretSlopeRun like this: round(math.tan(
math.radians(-1 * font[“post”].italicAngle)) * font[“head”].unitsPerEm)
This check allows for a 0.1° rounding difference between the Italic angle as calculated by the caret slope and post.italicAngle
Originally proposed at https://github.com/fonttools/fontbakery/issues/3670