diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-09-18 19:17:32 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-09-18 19:17:32 +0000 |
commit | 3d1240ae397d1637be6887815221bc17112ad4ce (patch) | |
tree | 1d71eb13e526ac0b3a19b2aaba0610160976c81e /pango/pangofc-fontmap.h | |
parent | d3d211a0e8ce537da876ddce7c442b2d4a6197a6 (diff) | |
parent | e023cf0d66b323359740c453481507ab91005a34 (diff) | |
download | pango-3d1240ae397d1637be6887815221bc17112ad4ce.tar.gz |
Merge branch 'ch/83' into 'master'
Add pango_fc_font_map_set_default_substitute
Closes #83
See merge request GNOME/pango!191
Diffstat (limited to 'pango/pangofc-fontmap.h')
-rw-r--r-- | pango/pangofc-fontmap.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h index a41ae1d9..c20bde60 100644 --- a/pango/pangofc-fontmap.h +++ b/pango/pangofc-fontmap.h @@ -106,6 +106,52 @@ hb_face_t * pango_fc_font_map_get_hb_face (PangoFcFontMap *fcfontmap, PangoFcFont *fcfont); /** + * PangoFcSubstituteFunc: + * @pattern: the FcPattern to tweak. + * @data: user data. + * + * Function type for doing final config tweaking on prepared FcPatterns. + */ +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: * * String representing a fontconfig property name that Pango sets on any |