mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[VarComposite] Fix skew
This commit is contained in:
1 parent
626f8e4de3
commit
8cf7076309
1 file changed
+2
-1
@@ -156,9 +156,10 @@ struct VarCompositeGlyphRecord
|
||||
float skewX, float skewY)
|
||||
{
|
||||
// https://github.com/fonttools/fonttools/blob/f66ee05f71c8b57b5f519ee975e95edcd1466e14/Lib/fontTools/misc/transform.py#L255
|
||||
// We need a sign difference compared to fonttools
|
||||
skewX = skewX * float (M_PI);
|
||||
skewY = skewY * float (M_PI);
|
||||
float other[6] = {1.f, tanf (skewY), tanf (skewX), 1.f, 0.f, 0.f};
|
||||
float other[6] = {1.f, tanf (skewY), -tanf (skewX), 1.f, 0.f, 0.f};
|
||||
transform (matrix, trans, other);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user