From: handa Date: Tue, 13 Dec 2005 00:51:18 +0000 (+0000) Subject: (ft_open): Check resize ratio. X-Git-Tag: REL-1-3-0~23 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27c941c4afdc1336c5d5d355508374540ca2beae;p=m17n%2Fm17n-lib.git (ft_open): Check resize ratio. --- diff --git a/src/font-ft.c b/src/font-ft.c index 9bbf531..6aedb46 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -1311,7 +1311,19 @@ ft_open (MFrame *frame, MFont *font, MFont *spec, MRealizedFont *rfont) FT_Face ft_face; MPlist *plist, *charmap_list = NULL; int charmap_index; - int size = font->size ? font->size : spec->size; + int size; + + if (font->size) + /* non-scalable font */ + size = font->size; + else if (spec->size) + { + int ratio = mfont_resize_ratio (font); + + size = ratio == 100 ? spec->size : spec->size * ratio / 100; + } + else + size = 120; if (rfont) {