From: handa Date: Tue, 28 Sep 2004 23:40:41 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: REL-1-2-0~171 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7cd2dd28f0aa719b1afa995519585ec0575a24e9;p=m17n%2Fm17n-lib.git *** empty log message *** --- 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;