summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorAlex Larsson <alexl@redhat.com>2001-11-18 23:23:14 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-11-18 23:23:14 +0000
commita409a746f1fdec933cd1be897cc6078e6050690f (patch)
treeefc5c88209034a84c3ce8900c7b26f089eb6840e /pango/pango-context.c
parentba6b12ca588709d4d408e691fbe9698a5a97339d (diff)
downloadpango-a409a746f1fdec933cd1be897cc6078e6050690f.tar.gz
Add new function pango_context_load_fontset() to wrap
2001-11-18 Alex Larsson <alexl@redhat.com> * pango/pango-context.[ch]: Add new function pango_context_load_fontset() to wrap pango_font_map_load_fontset(). Add PangoContext arguments to load_font and load_fontset. * pango/pango-fontmap.[ch]: * pango/pangoft2-fontmap.c: * pango/pangowin32-fontmap.c: * pango/pangox-fontmap.c: * pango/pangoxft-font.c: * pango/pangoxft-fontmap.c Add PangoContext arguments to load_font and load_fontset.
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 19ca1af4..53099411 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -215,7 +215,28 @@ pango_context_load_font (PangoContext *context,
{
g_return_val_if_fail (context != NULL, NULL);
- return pango_font_map_load_font (context->font_map, desc);
+ return pango_font_map_load_font (context->font_map, context, desc);
+}
+
+/**
+ * pango_context_load_fontset:
+ * @context: a #PangoContext
+ * @desc: a #PangoFontDescription describing the fonts to load
+ * @language: a #PangoLanguage the fonts will be used for
+ *
+ * Load a set of fonts in the context that can be used to render
+ * a font matching @desc.
+ *
+ * Returns the fontset, or %NULL if no font matched.
+ **/
+PangoFontset *
+pango_context_load_fontset (PangoContext *context,
+ const PangoFontDescription *desc,
+ PangoLanguage *language)
+{
+ g_return_val_if_fail (context != NULL, NULL);
+
+ return pango_font_map_load_fontset (context->font_map, context, desc, language);
}
/**
@@ -633,6 +654,7 @@ add_engines (PangoContext *context,
g_object_unref (current_fonts);
current_fonts = pango_font_map_load_fontset (context->font_map,
+ context,
current_desc,
language);
}
@@ -705,7 +727,7 @@ pango_context_get_metrics (PangoContext *context,
g_return_val_if_fail (PANGO_IS_CONTEXT (context), NULL);
g_return_val_if_fail (desc != NULL, NULL);
- current_fonts = pango_font_map_load_fontset (context->font_map, desc, language);
+ current_fonts = pango_font_map_load_fontset (context->font_map, context, desc, language);
metrics = pango_fontset_get_metrics (current_fonts);