[varc] Optimize

This commit is contained in:
Behdad Esfahbod committed 2024-04-16 17:10:46 -06:00
1 parent 49c5ed38e4
commit df330e7abd
1 file changed
+3 -2
+3 -2
View File
@@ -217,8 +217,9 @@ VarComponent::get_path_at (hb_font_t *font,
component_coords = hb_array<int> ();
coord_setter_t coord_setter (component_coords);
for (unsigned i = 0; i < axisIndices.length; i++)
coord_setter[axisIndices[i]] = axisValues[i];
// Go backwards, to reduce coord_setter vector reallocations
for (unsigned i = axisIndices.length; i; i--)
coord_setter[axisIndices[i - 1]] = axisValues[i - 1];
component_coords = coord_setter.get_coords ();