diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 1b63517db..d91235f24 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -276,7 +276,9 @@ struct Glyph } #ifndef HB_NO_VAR - glyf_accelerator.gvar->apply_deltas_to_points (gid, font, points.as_array ()); + glyf_accelerator.gvar->apply_deltas_to_points (gid, + hb_array (font->coords, font->num_coords), + points.as_array ()); #endif // mainly used by CompositeGlyph calculating new X/Y offset value so no need to extend it diff --git a/src/hb-ot-var-gvar-table.hh b/src/hb-ot-var-gvar-table.hh index c23e1f74b..e02063ca4 100644 --- a/src/hb-ot-var-gvar-table.hh +++ b/src/hb-ot-var-gvar-table.hh @@ -548,10 +548,11 @@ struct gvar { return (i >= end) ? start : (i + 1); } public: - bool apply_deltas_to_points (hb_codepoint_t glyph, hb_font_t *font, + bool apply_deltas_to_points (hb_codepoint_t glyph, + hb_array_t coords, const hb_array_t points) const { - if (!font->num_coords) return true; + if (!coords) return true; if (unlikely (glyph >= table->glyphCount)) return true; @@ -578,7 +579,6 @@ struct gvar if (points.arrayZ[i].is_end_point) end_points.push (i); - auto coords = hb_array (font->coords, font->num_coords); unsigned num_coords = table->axisCount; hb_array_t shared_tuples = (table+table->sharedTuples).as_array (table->sharedTupleCount * table->axisCount);