From 7cd2dd28f0aa719b1afa995519585ec0575a24e9 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 28 Sep 2004 23:40:41 +0000 Subject: [PATCH] *** empty log message *** --- src/ChangeLog | 5 +++++ src/font-ft.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 600070d..2af7ce1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-09-29 Kenichi Handa + + * font-ft.c (fc_list): Check the return value of + FcPatternGetString. + 2004-09-28 Kenichi Handa * m17n-X.c (MXFont, MXFontList): New types. diff --git a/src/font-ft.c b/src/font-ft.c index 590fd76..901756d 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -77,8 +77,8 @@ static MFTtoProp ft_to_prop[] = static int ft_to_prop_size = sizeof ft_to_prop / sizeof ft_to_prop[0]; /** List of FreeType fonts. Keys are family names, values are plists - contains fonts of the corresponding family. In the deeper plist, - keys are Mt, values are (MFTInfo *). */ + containing fonts of the corresponding family. In the deeper + plist, keys are Mt, values are (MFTInfo *). */ static MPlist *ft_font_list; static int all_fonts_scaned; @@ -346,8 +346,12 @@ fc_list (MSymbol family) { char *filename, *languages; - FcPatternGetString (fs->fonts[i], FC_FILE, 0, (FcChar8 **) &filename); - FcPatternGetString (fs->fonts[i], FC_LANG, 0, (FcChar8 **) &languages); + if (FcPatternGetString (fs->fonts[i], FC_FILE, 0, (FcChar8 **) &filename) + != FcResultMatch) + continue; + if (FcPatternGetString (fs->fonts[i], FC_LANG, 0, (FcChar8 **) &languages) + != FcResultMatch) + languages = NULL; if (family == Mnil) { MSymbol fam; -- 1.7.10.4