[pango/kill-ft-face: 1/14] Add an api to get features of a font
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/kill-ft-face: 1/14] Add an api to get features of a font
- Date: Wed, 10 Jul 2019 03:46:46 +0000 (UTC)
commit 7b59b884ebd13eb8e867ac78afbf938c9a3b8d99
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 9 23:08:37 2019 -0400
Add an api to get features of a font
pango/fonts.c | 10 ++++++++++
pango/pango-font-private.h | 8 ++++----
pango/pango-font.h | 5 +++++
3 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/pango/fonts.c b/pango/fonts.c
index 7d61b992..e363b7cc 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -2354,3 +2354,13 @@ pango_font_face_list_sizes (PangoFontFace *face,
*n_sizes = 0;
}
}
+
+void
+pango_font_get_features (PangoFont *font,
+ hb_feature_t *features,
+ guint len,
+ guint *num_features)
+{
+ if (PANGO_FONT_GET_CLASS (font)->get_features)
+ PANGO_FONT_GET_CLASS (font)->get_features (font, features, len, num_features);
+}
diff --git a/pango/pango-font-private.h b/pango/pango-font-private.h
index 48ad8771..98899580 100644
--- a/pango/pango-font-private.h
+++ b/pango/pango-font-private.h
@@ -177,11 +177,11 @@ struct _PangoFontClass
PangoFontMap * (*get_font_map) (PangoFont *font);
PangoFontDescription *(*describe_absolute) (PangoFont *font);
hb_font_t * (*create_hb_font) (PangoFont *font);
+ void (*get_features) (PangoFont *font,
+ hb_feature_t *features,
+ guint len,
+ guint *num_features);
- /*< private >*/
-
- /* Padding for future expansion */
- void (*_pango_reserved1) (void);
};
/* used for very rare and miserable situtations that we cannot even
diff --git a/pango/pango-font.h b/pango/pango-font.h
index c2db5e9e..55d6dfad 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -487,6 +487,11 @@ PangoFontMap *pango_font_get_font_map (PangoFont *font);
PANGO_AVAILABLE_IN_1_44
hb_font_t * pango_font_get_hb_font (PangoFont *font);
+PANGO_AVAILABLE_IN_1_44
+void pango_font_get_features (PangoFont *font,
+ hb_feature_t *features,
+ guint len,
+ guint *num_features);
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]