mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-05 05:25:05 +00:00
[VarComposite] Optimize scale()
This commit is contained in:
parent
6a55e73d6a
commit
4e256f5a57
1 changed files with 4 additions and 3 deletions
|
@ -144,9 +144,10 @@ struct VarCompositeGlyphRecord
|
|||
static void scale (float (&matrix)[4], contour_point_t &trans,
|
||||
float scaleX, float scaleY)
|
||||
{
|
||||
// https://github.com/fonttools/fonttools/blob/f66ee05f71c8b57b5f519ee975e95edcd1466e14/Lib/fontTools/misc/transform.py#L224
|
||||
float other[6] = {scaleX, 0.f, 0.f, scaleY, 0.f, 0.f};
|
||||
transform (matrix, trans, other);
|
||||
matrix[0] *= scaleX;
|
||||
matrix[1] *= scaleX;
|
||||
matrix[2] *= scaleY;
|
||||
matrix[3] *= scaleY;
|
||||
}
|
||||
|
||||
static void rotate (float (&matrix)[4], contour_point_t &trans,
|
||||
|
|
Loading…
Add table
Reference in a new issue