summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap-private.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-private.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-private.h')
-rw-r--r--pango/pangofc-fontmap-private.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/pango/pangofc-fontmap-private.h b/pango/pangofc-fontmap-private.h
index 131f7266..b32982f2 100644
--- a/pango/pangofc-fontmap-private.h
+++ b/pango/pangofc-fontmap-private.h
@@ -94,14 +94,23 @@ struct _PangoFcFontMap
PangoFontMap parent_instance;
PangoFcFontMapPrivate *priv;
+
+ /* Function to call on prepared patterns to do final
+ * config tweaking.
+ */
+ PangoFcSubstituteFunc substitute_func;
+ gpointer substitute_data;
+ GDestroyNotify substitute_destroy;
};
/**
* PangoFcFontMapClass:
* @default_substitute: (nullable): Substitutes in default
* values for unspecified fields in a #FcPattern. This will
- * be called prior to creating a font for the pattern. May be
- * %NULL. Deprecated in favor of @font_key_substitute().
+ * be called prior to creating a font for the pattern.
+ * Implementations must call substitute_func if it is
+ * defined. May be %NULL. Deprecated in favor of
+ * @font_key_substitute().
* @new_font: Creates a new #PangoFcFont for the specified
* pattern of the appropriate type for this font map. The
* @pattern argument must be passed to the "pattern" property
@@ -127,7 +136,8 @@ struct _PangoFcFontMap
* @fontset_key_substitute: (nullable): Substitutes in
* default values for unspecified fields in a
* #FcPattern. This will be called prior to creating a font
- * for the pattern. May be %NULL. (Since: 1.24)
+ * for the pattern. Implementations must call substitute_func
+ * if it is defined. May be %NULL. (Since: 1.24)
* @create_font: (nullable): Creates a new #PangoFcFont for
* the specified pattern of the appropriate type for this
* font map using information from the font key that is