summaryrefslogtreecommitdiff
path: root/pango/pangoft2-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-11-28 21:14:28 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-11-28 21:14:28 +0000
commita6d6171d26c953a04f9f98d3366fafd9920b9ed2 (patch)
treed6841dd6d90d57133d1a1ece342602caa306bb1f /pango/pangoft2-fontmap.c
parentcb0cef6b3f741c579337a8388ccc8548cc03408f (diff)
downloadpango-a6d6171d26c953a04f9f98d3366fafd9920b9ed2.tar.gz
Mark 1.2 API additions, fix some doc comments.
* pango/pangoxft-fontmap.c: * pango/pangoxft-font.c: * pango/pangowin32.c: * pango/pangoft2-fontmap.c: Mark 1.2 API additions, fix some doc comments. * pango/pangoft2-fontmap.c (pango_ft2_font_map_set_default_substitute): Implement this function. (#99850)
Diffstat (limited to 'pango/pangoft2-fontmap.c')
-rw-r--r--pango/pangoft2-fontmap.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index 0c7d2c6d..c9c28aa1 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -119,10 +119,12 @@ static PangoFT2FontMap *pango_ft2_global_fontmap = NULL;
* to cache information about available fonts, and holds
* certain global parameters such as the resolution and
* the default substitute function (see
- * pango_font_map_set_default_substitute ()).
+ * pango_font_map_set_default_substitute()).
*
* Return value: the newly created fontmap object. Unref
- * with g_object_unref when you are finished with it.
+ * with g_object_unref() when you are finished with it.
+ *
+ * Since: 1.2
**/
PangoFontMap *
pango_ft2_font_map_new (void)
@@ -158,6 +160,37 @@ pango_ft2_font_map_new (void)
}
/**
+ * pango_ft2_fontmap_set_default_substitute:
+ * @fontmap: a #PangoFT2FontMap
+ * @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 antiasing options.
+ *
+ * Since: 1.2
+ **/
+void
+pango_ft2_font_map_set_default_substitute (PangoFT2FontMap *fontmap,
+ PangoFT2SubstituteFunc func,
+ gpointer data,
+ GDestroyNotify notify)
+{
+ if (fontmap->substitute_destroy)
+ fontmap->substitute_destroy (fontmap->substitute_data);
+
+ fontmap->substitute_func = func;
+ fontmap->substitute_data = data;
+ fontmap->substitute_destroy = notify;
+
+ pango_fc_clear_fontset_hash_list (fontmap);
+}
+
+/**
* pango_ft2_font_map_substitute_changed:
* @fontmap: a #PangoFT2Fontmap
*
@@ -166,6 +199,8 @@ pango_ft2_font_map_new (void)
* pango_ft2_font_map_set_default_substitute() change.
* That is, if your subsitution function will return different
* results for the same input pattern, you must call this function.
+ *
+ * Since: 1.2
**/
void
pango_ft2_font_map_substitute_changed (PangoFT2FontMap *fontmap)
@@ -201,6 +236,8 @@ pango_ft2_font_map_set_resolution (PangoFT2FontMap *fontmap,
* Create a #PangoContext for the given fontmap.
*
* Return value: the newly created context; free with g_object_unref().
+ *
+ * Since: 1.2
**/
PangoContext *
pango_ft2_font_map_create_context (PangoFT2FontMap *fontmap)