[pango/hb-getters: 45/46] Pass the FT_Face to cairo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/hb-getters: 45/46] Pass the FT_Face to cairo
- Date: Thu, 31 Jan 2019 09:13:40 +0000 (UTC)
commit 86e13453b15341d6dd692bbf23e7f6234d9e1078
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 19 13:37:52 2018 -0500
Pass the FT_Face to cairo
Set the FT_Face on the pattern.
cairo picks it up from there.
pango/pangofc-fontmap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index ac5cbd5c..a1292f88 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -51,6 +51,7 @@
#include "pango-impl-utils.h"
#include "pango-enum-types.h"
#include "pangoft2-private.h"
+#include <fontconfig/fcfreetype.h>
#include <hb-ft.h>
@@ -2724,6 +2725,8 @@ create_faces (PangoFcFontMap *fcfontmap,
}
data->hb_face = hb_ft_face_create_cached (data->ft_face);
+ /* Add the FT_Face to the pattern so cairo picks it up */
+ FcPatternAddFTFace (data->pattern, FC_FT_FACE, data->ft_face);
}
hb_face_t *
@@ -2733,7 +2736,7 @@ pango_fc_font_map_get_hb_face (PangoFcFontMap *fcfontmap,
PangoFcFontFaceData *data;
data = pango_fc_font_map_get_font_face_data (fcfontmap, fcfont->font_pattern);
-
+
if (!data->hb_face)
create_faces (fcfontmap, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]