From: handa Date: Thu, 30 Sep 2004 13:11:55 +0000 (+0000) Subject: (ft_select): Ignore family on calling mfont__score. X-Git-Tag: REL-1-2-0~158 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e5e661f333a2eeef634439f5195c7a7acf7bf023;p=m17n%2Fm17n-lib.git (ft_select): Ignore family on calling mfont__score. --- diff --git a/src/font-ft.c b/src/font-ft.c index aa94d31..6c5e828 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -545,12 +545,18 @@ ft_select (MFrame *frame, MFont *spec, MFont *request, int limited_size) { MFTInfo *ft_info = MPLIST_VAL (p); int score; + unsigned short family_id; if (! mplist_find_by_key (ft_info->charmap_list, registry)) continue; - /* We always ignore FOUNDRY. */ + /* Always ignore FOUNDRY. */ ft_info->font.property[MFONT_FOUNDRY] = spec->property[MFONT_FOUNDRY]; + /* Ignore FAMILY too. */ + family_id = ft_info->font.property[MFONT_FAMILY]; + ft_info->font.property[MFONT_FAMILY] = spec->property[MFONT_FAMILY]; score = mfont__score (&ft_info->font, spec, request, limited_size); + ft_info->font.property[MFONT_FAMILY] = family_id; + if (score >= 0 && (! best_font || best_score > score))