summaryrefslogtreecommitdiff
path: root/pango/pango-fontmap.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-fontmap.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-fontmap.c')
-rw-r--r--pango/pango-fontmap.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index 5f678979..fd193f5e 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -25,6 +25,7 @@
static void pango_font_map_class_init (PangoFontMapClass *class);
static PangoFontset *pango_font_map_real_load_fontset (PangoFontMap *fontmap,
+ PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language);
@@ -67,6 +68,7 @@ pango_font_map_class_init (PangoFontMapClass *class)
/**
* pango_font_map_load_font:
* @fontmap: a #PangoFontMap
+ * @context: the #PangoContext the font will be used with
* @desc: a #PangoFontDescription describing the font to load
*
* Load the font in the fontmap that is the closest match for @desc.
@@ -75,11 +77,12 @@ pango_font_map_class_init (PangoFontMapClass *class)
**/
PangoFont *
pango_font_map_load_font (PangoFontMap *fontmap,
+ PangoContext *context,
const PangoFontDescription *desc)
{
g_return_val_if_fail (fontmap != NULL, NULL);
- return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_font (fontmap, desc);
+ return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_font (fontmap, context, desc);
}
/**
@@ -104,6 +107,7 @@ pango_font_map_list_families (PangoFontMap *fontmap,
/**
* pango_font_map_load_fontset:
* @fontmap: a #PangoFontMap
+ * @context: the #PangoContext the font will be used with
* @desc: a #PangoFontDescription describing the font to load
* @language: a #PangoLanguage the fonts will be used for
*
@@ -114,16 +118,18 @@ pango_font_map_list_families (PangoFontMap *fontmap,
**/
PangoFontset *
pango_font_map_load_fontset (PangoFontMap *fontmap,
+ PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language)
{
g_return_val_if_fail (fontmap != NULL, 0);
- return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_fontset (fontmap, desc, language);
+ return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_fontset (fontmap, context, desc, language);
}
static void
pango_font_map_fontset_add_fonts (PangoFontMap *fontmap,
+ PangoContext *context,
PangoFontsetSimple *fonts,
PangoFontDescription *desc,
char *family)
@@ -142,7 +148,7 @@ pango_font_map_fontset_add_fonts (PangoFontMap *fontmap,
for (j = 0; j < n_aliases; j++)
{
pango_font_description_set_family_static (desc, aliases[j]);
- font = pango_font_map_load_font (fontmap, desc);
+ font = pango_font_map_load_font (fontmap, context, desc);
if (font)
pango_fontset_simple_append (fonts, font);
}
@@ -150,7 +156,7 @@ pango_font_map_fontset_add_fonts (PangoFontMap *fontmap,
else
{
pango_font_description_set_family_static (desc, family);
- font = pango_font_map_load_font (fontmap, desc);
+ font = pango_font_map_load_font (fontmap, context, desc);
if (font)
pango_fontset_simple_append (fonts, font);
}
@@ -158,6 +164,7 @@ pango_font_map_fontset_add_fonts (PangoFontMap *fontmap,
static PangoFontset *
pango_font_map_real_load_fontset (PangoFontMap *fontmap,
+ PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language)
{
@@ -172,6 +179,7 @@ pango_font_map_real_load_fontset (PangoFontMap *fontmap,
for (i = 0; families[i]; i++)
pango_font_map_fontset_add_fonts (fontmap,
+ context,
fonts,
tmp_desc,
families[i]);
@@ -197,6 +205,7 @@ pango_font_map_real_load_fontset (PangoFontMap *fontmap,
g_free (ctmp2);
pango_font_map_fontset_add_fonts (fontmap,
+ context,
fonts,
tmp_desc,
"Sans");
@@ -221,6 +230,7 @@ pango_font_map_real_load_fontset (PangoFontMap *fontmap,
g_free (ctmp2);
pango_font_map_fontset_add_fonts (fontmap,
+ context,
fonts,
tmp_desc,
"Sans");