[VarComposite] Optimize translate, second try

pull/4212/head
Behdad Esfahbod 2 years ago
parent 83bbeaca20
commit 79aa9e93d3
  1. 5
      src/OT/glyf/VarCompositeGlyph.hh

@ -140,9 +140,8 @@ struct VarCompositeGlyphRecord
if (!translateX && !translateY)
return;
// https://github.com/fonttools/fonttools/blob/f66ee05f71c8b57b5f519ee975e95edcd1466e14/Lib/fontTools/misc/transform.py#L213
float other[6] = {1.f, 0.f, 0.f, 1.f, translateX, translateY};
transform (matrix, trans, other);
trans.x += matrix[0] * translateX + matrix[2] * translateY;
trans.y += matrix[1] * translateX + matrix[3] * translateY;
}
static void scale (float (&matrix)[4], contour_point_t &trans,

Loading…
Cancel
Save