[coretext] Add hb_coretext_face_get_cg_font()

Not sure if it's useful, but it was missing.
This commit is contained in:
Behdad Esfahbod 2012-12-09 18:47:36 -05:00
parent 8611235688
commit 9a8395824b
2 changed files with 19 additions and 8 deletions

View File

@ -91,6 +91,14 @@ _hb_coretext_shaper_face_data_destroy (hb_coretext_shaper_face_data_t *data)
free (data);
}
CGFontRef
hb_coretext_face_get_ct_font (hb_face_t *face)
{
if (unlikely (!hb_coretext_shaper_face_data_ensure (face))) return NULL;
hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face);
return face_data->cg_font;
}
/*
* shaper font data
@ -149,19 +157,19 @@ _hb_coretext_shaper_shape_plan_data_destroy (hb_coretext_shaper_shape_plan_data_
{
}
CTFontRef
hb_coretext_font_get_ct_font (hb_font_t *font)
{
if (unlikely (!hb_coretext_shaper_font_data_ensure (font))) return NULL;
hb_coretext_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
return font_data->ct_font;
}
/*
* shaper
*/
CTFontRef
hb_coretext_font_get_ct_font (hb_font_t *font)
{
if (unlikely (!hb_coretext_shaper_font_data_ensure (font))) return 0;
hb_coretext_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font);
return font_data->ct_font;
}
hb_bool_t
_hb_coretext_shape (hb_shape_plan_t *shape_plan,
hb_font_t *font,

View File

@ -34,6 +34,9 @@
HB_BEGIN_DECLS
CGFontRef
hb_coretext_face_get_cg_font (hb_face_t *face);
CTFontRef
hb_coretext_font_get_ct_font (hb_font_t *font);