提交 95808bad 编写于 作者: B Behdad Esfahbod

Add new API hb_font_set_face()

For completeness.
上级 4ec19319
......@@ -1371,6 +1371,35 @@ hb_font_get_parent (hb_font_t *font)
return font->parent;
}
/**
* hb_font_set_face:
* @font: a font.
* @face: new face.
*
* Sets font-face of @font.
*
* Since: 1.4.3
**/
void
hb_font_set_face (hb_font_t *font,
hb_face_t *face)
{
if (font->immutable)
return;
if (unlikely (!face))
face = hb_face_get_empty ();
if (font->face == face)
return;
hb_face_t *old = font->face;
font->face = hb_face_reference (face);
hb_face_destroy (old);
}
/**
* hb_font_get_face:
* @font: a font.
......
......@@ -563,6 +563,10 @@ hb_font_set_parent (hb_font_t *font,
HB_EXTERN hb_font_t *
hb_font_get_parent (hb_font_t *font);
HB_EXTERN void
hb_font_set_face (hb_font_t *font,
hb_face_t *face);
HB_EXTERN hb_face_t *
hb_font_get_face (hb_font_t *font);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册