0, /* y_ppem */
0, /* num_coords */
- NULL, /* x_coords */
- NULL, /* y_coords */
+ NULL, /* coords */
const_cast<hb_font_funcs_t *> (&_hb_font_funcs_nil), /* klass */
NULL, /* user_data */
hb_face_destroy (font->face);
hb_font_funcs_destroy (font->klass);
- if (font->x_coords)
- free (font->x_coords);
- if (font->y_coords && font->y_coords != font->x_coords)
- free (font->y_coords);
+ if (font->coords)
+ free (font->coords);
free (font);
}
if (unlikely (coords_length && !copy))
return;
- if (font->x_coords)
- free (font->x_coords);
- if (font->y_coords && font->y_coords != font->x_coords)
- free (font->y_coords);
+ if (font->coords)
+ free (font->coords);
if (coords_length)
memcpy (copy, coords, coords_length * sizeof (coords[0]));
- font->x_coords = font->y_coords = copy;
+ font->coords = copy;
font->num_coords = coords_length;
}
private:
inline hb_position_t get_x_delta (hb_font_t *font, const VariationStore &store) const
- { return font->em_scalef_x (get_delta (store, font->x_coords, font->num_coords)); }
+ { return font->em_scalef_x (get_delta (font, store)); }
inline hb_position_t get_y_delta (hb_font_t *font, const VariationStore &store) const
- { return font->em_scalef_y (get_delta (store, font->y_coords, font->num_coords)); }
+ { return font->em_scalef_y (get_delta (font, store)); }
inline bool sanitize (hb_sanitize_context_t *c) const
{
private:
- inline float get_delta (const VariationStore &store,
- int *coords, unsigned int coord_count) const
+ inline float get_delta (hb_font_t *font, const VariationStore &store) const
{
- return store.get_delta (outerIndex, innerIndex, coords, coord_count);
+ return store.get_delta (outerIndex, innerIndex, font->coords, font->num_coords);
}
protected: