[coretext] Add hb_coretext_face_get_cg_font()
Not sure if it's useful, but it was missing.
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
index f626a2f..c0fe637 100644
--- a/src/hb-coretext.cc
+++ b/src/hb-coretext.cc
@@ -91,6 +91,14 @@
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 @@
{
}
+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,
diff --git a/src/hb-coretext.h b/src/hb-coretext.h
index 0b34203..c4954fa 100644
--- a/src/hb-coretext.h
+++ b/src/hb-coretext.h
@@ -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);