[pango/wip/kill-shape-engine-win32: 37/59] coretext: Implement create_hb_font
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/wip/kill-shape-engine-win32: 37/59] coretext: Implement create_hb_font
- Date: Wed, 17 Jul 2019 02:55:21 +0000 (UTC)
commit ffea74fdeeab8750bda72cebfdd595bb3ac3518c
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]