ot-spec says skewX angle should be counter-clockwise so we must negate
Transform.skew method assumes skewX angle goes clockwise. verified using test_glyphs-glyf_colr_1.ttf test font from googlefonts/color-fonts repo. Will add that to the tests.
This commit is contained in:
parent
55cc41a24e
commit
c15e77cbc9
@ -1667,11 +1667,11 @@ class Paint(getFormatSwitchingBaseTableClass("uint8")):
|
||||
.translate(-self.centerX, -self.centerY)
|
||||
)
|
||||
elif self.Format == PaintFormat.PaintSkew:
|
||||
return Identity.skew(radians(self.xSkewAngle), radians(self.ySkewAngle))
|
||||
return Identity.skew(radians(-self.xSkewAngle), radians(self.ySkewAngle))
|
||||
elif self.Format == PaintFormat.PaintSkewAroundCenter:
|
||||
return (
|
||||
Identity.translate(self.centerX, self.centerY)
|
||||
.skew(radians(self.xSkewAngle), radians(self.ySkewAngle))
|
||||
.skew(radians(-self.xSkewAngle), radians(self.ySkewAngle))
|
||||
.translate(-self.centerX, -self.centerY)
|
||||
)
|
||||
if PaintFormat(self.Format).is_variable():
|
||||
|
Loading…
x
Reference in New Issue
Block a user