summaryrefslogtreecommitdiff
path: root/pango/pangowin32-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/pangowin32-fontmap.c
parent1e990af007255d1137ec76bd86658198d73994c6 (diff)
downloadpango-caabe183c7747d7486695071ab592e677bbdce25.tar.gz
Allow font_family=NULL in load_font() and load_fontset() methods
Diffstat (limited to 'pango/pangowin32-fontmap.c')
-rw-r--r--pango/pangowin32-fontmap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 833219a9..360ec03f 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -618,13 +618,15 @@ pango_win32_font_map_load_font (PangoFontMap *fontmap,
PangoWin32Family *win32family;
PangoFont *result = NULL;
GSList *tmp_list;
+ const char *family;
g_return_val_if_fail (description != NULL, NULL);
- PING (("name=%s", pango_font_description_get_family (description)));
+ family = pango_font_description_get_family (description);
+ family = family ? family : "";
+ PING (("name=%s", family))
- win32family = g_hash_table_lookup (win32fontmap->families,
- pango_font_description_get_family (description));
+ win32family = g_hash_table_lookup (win32fontmap->families, family);
if (win32family)
{
PangoWin32Face *best_match = NULL;