summaryrefslogtreecommitdiff
path: root/pango/pango-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-04-06 19:45:04 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-04-06 19:45:04 -0400
commitcaabe183c7747d7486695071ab592e677bbdce25 (patch)
tree5ed1c7a510b18a3286a458bd8dd6a6a20b71bf6d /pango/pango-fontmap.c
parent1e990af007255d1137ec76bd86658198d73994c6 (diff)
downloadpango-caabe183c7747d7486695071ab592e677bbdce25.tar.gz
Allow font_family=NULL in load_font() and load_fontset() methods
Diffstat (limited to 'pango/pango-fontmap.c')
-rw-r--r--pango/pango-fontmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index a2b1452d..13f4263c 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -90,7 +90,6 @@ pango_font_map_load_font (PangoFontMap *fontmap,
const PangoFontDescription *desc)
{
g_return_val_if_fail (fontmap != NULL, NULL);
- g_return_val_if_fail (pango_font_description_get_family (desc) != NULL, NULL);
return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_font (fontmap, context, desc);
}
@@ -133,7 +132,6 @@ pango_font_map_load_fontset (PangoFontMap *fontmap,
PangoLanguage *language)
{
g_return_val_if_fail (fontmap != NULL, NULL);
- g_return_val_if_fail (pango_font_description_get_family (desc) != NULL, NULL);
return PANGO_FONT_MAP_GET_CLASS (fontmap)->load_fontset (fontmap, context, desc, language);
}
@@ -180,12 +178,14 @@ pango_font_map_real_load_fontset (PangoFontMap *fontmap,
PangoLanguage *language)
{
PangoFontDescription *tmp_desc = pango_font_description_copy_static (desc);
+ const char *family;
char **families;
int i;
PangoFontsetSimple *fonts;
static GHashTable *warned_fonts = NULL;
- families = g_strsplit (pango_font_description_get_family (desc), ",", -1);
+ family = pango_font_description_get_family (desc);
+ families = g_strsplit (family ? family : "", ",", -1);
fonts = pango_fontset_simple_new (language);