summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.h
diff options
context:
space:
mode:
authorCaleb Hearon <crh0872@gmail.com>2020-06-08 22:22:55 +0000
committerCaleb Hearon <crh0872@gmail.com>2020-06-13 03:29:35 +0000
commite023cf0d66b323359740c453481507ab91005a34 (patch)
tree75171773d024713c7103d13c3764223908f7df8b /pango/pangofc-fontmap.h
parent79baf68b39e7654f8f00c60c8a86ef6054a391dc (diff)
downloadpango-e023cf0d66b323359740c453481507ab91005a34.tar.gz
add pango_fc_font_map_set_default_substitute
added: pango_fc_font_map_set_default_substitute pango_fc_font_map_default_substitute_changed deprecated: pango_ft2_font_map_set_default_substitute pango_ft2_font_map_changed pango_xft_font_map_set_default_substitute pango_xft_font_map_changed Now PangoCairoFcFontMap will call what is passed to pango_fc_font_map_set_default_substitute when it is time. The deprecated functions make calls to the parent (FC) class now. The user-supplied callbacks are executed in the exact same places as before.
Diffstat (limited to 'pango/pangofc-fontmap.h')
-rw-r--r--pango/pangofc-fontmap.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index f7cc88b4..c20bde60 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -114,6 +114,43 @@ hb_face_t * pango_fc_font_map_get_hb_face (PangoFcFontMap *fcfontmap,
*/
typedef void (*PangoFcSubstituteFunc) (FcPattern *pattern,
gpointer data);
+
+/**
+ * pango_fc_font_map_set_default_substitute:
+ * @fontmap: a #PangoFcFontMap
+ * @func: function to call to to do final config tweaking
+ * on #FcPattern objects.
+ * @data: data to pass to @func
+ * @notify: function to call when @data is no longer used.
+ *
+ * Sets a function that will be called to do final configuration
+ * substitution on a #FcPattern before it is used to load
+ * the font. This function can be used to do things like set
+ * hinting and antialiasing options.
+ *
+ * Since: 1.46
+ */
+PANGO_AVAILABLE_IN_1_46
+void pango_fc_font_map_set_default_substitute (PangoFcFontMap *fontmap,
+ PangoFcSubstituteFunc func,
+ gpointer data,
+ GDestroyNotify notify);
+
+/**
+ * pango_fc_font_map_substitute_changed:
+ * @fontmap: a #PangoFcFontMap
+ *
+ * Call this function any time the results of the
+ * default substitution function set with
+ * pango_fc_font_map_set_default_substitute() change.
+ * That is, if your substitution function will return different
+ * results for the same input pattern, you must call this function.
+ *
+ * Since: 1.46
+ */
+PANGO_AVAILABLE_IN_1_46
+void pango_fc_font_map_substitute_changed (PangoFcFontMap *fontmap);
+
/**
* PANGO_FC_GRAVITY:
*