[pango/kill-ft-face: 14/23] coretext: Implement create_hb_font
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/kill-ft-face: 14/23] coretext: Implement create_hb_font
- Date: Mon, 15 Jul 2019 11:41:13 +0000 (UTC)
commit 541aa54f6a72aa8877073c1f2140f99f877fedd0
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jul 13 00:05:01 2019 -0400
coretext: Implement create_hb_font
This is untested.
pango/pangocoretext.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c
index a6eaa1fc..055ed275 100644
--- a/pango/pangocoretext.c
+++ b/pango/pangocoretext.c
@@ -208,6 +208,17 @@ pango_core_text_font_get_font_map (PangoFont *font)
return ctfont->priv->fontmap;
}
+static hb_font_t *
+pango_core_text_font_create_hb_font (PangoFont *font)
+{
+ PangoCoreTextFont *ctfont = (PangoCoreTextFont *)font;
+
+ if (ctfont->priv->font_ref)
+ return hb_coretext_font_create (ctfont->priv->font_ref);
+
+ return NULL;
+}
+
static void
pango_core_text_font_init (PangoCoreTextFont *ctfont)
{
@@ -227,6 +238,7 @@ pango_core_text_font_class_init (PangoCoreTextFontClass *class)
font_class->get_coverage = pango_core_text_font_get_coverage;
font_class->find_shaper = pango_core_text_font_find_shaper;
font_class->get_font_map = pango_core_text_font_get_font_map;
+ font_class->create_hb_font = pango_core_text_font_create_hb_font;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]