From: handa Date: Thu, 25 Aug 2005 01:22:09 +0000 (+0000) Subject: (compare_font_score): Prefer a font of not X-Git-Tag: REL-1-3-0~227 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5b77828079e7b078fe73aeb4f4ef57683b186b66;p=m17n%2Fm17n-lib.git (compare_font_score): Prefer a font of not for_full_width. --- diff --git a/src/font.c b/src/font.c index 3dc2301..4fb02f2 100644 --- a/src/font.c +++ b/src/font.c @@ -1330,7 +1330,11 @@ mfont__available (MFrame *frame, MFont *font) static int compare_font_score (const void *e1, const void *e2) { - return (((MFontScore *) e1)->score > ((MFontScore *) e2)->score); + MFontScore *s1 = (MFontScore *) e1, *s2 = (MFontScore *) e2; + + return (s1->font->for_full_width == s2->font->for_full_width + ? s1->score > s2->score + : s1->font->for_full_width); } void