From e5e661f333a2eeef634439f5195c7a7acf7bf023 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 30 Sep 2004 13:11:55 +0000 Subject: [PATCH] (ft_select): Ignore family on calling mfont__score. --- src/font-ft.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)) -- 1.7.10.4