提交 ad69e8f0 编写于 作者: B Behdad Esfahbod

[GX] Add new API hb_font_set_var_coords_normalized()

Will probably change.
上级 151d93de
......@@ -1548,6 +1548,29 @@ hb_font_get_ppem (hb_font_t *font,
}
void
hb_font_set_var_coords_normalized (hb_font_t *font,
int *coords, /* XXX 2.14 normalized */
unsigned int coords_length)
{
if (font->immutable)
return;
int *copy = (int *) calloc (coords_length, sizeof (coords[0]));
if (unlikely (!copy))
return;
if (font->x_coords)
free (font->x_coords);
if (font->y_coords && font->y_coords != font->x_coords)
free (font->y_coords);
memcpy (copy, coords, coords_length * sizeof (coords[0]));
font->x_coords = font->y_coords = copy;
font->num_coords = coords_length;
}
#ifndef HB_DISABLE_DEPRECATED
/*
......
......@@ -604,6 +604,11 @@ hb_font_get_ppem (hb_font_t *font,
unsigned int *y_ppem);
HB_EXTERN void
hb_font_set_var_coords_normalized (hb_font_t *font,
int *coords, /* XXX 2.14 normalized */
unsigned int coords_length);
HB_END_DECLS
#endif /* HB_FONT_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册