From 27c941c4afdc1336c5d5d355508374540ca2beae Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 13 Dec 2005 00:51:18 +0000 Subject: [PATCH] (ft_open): Check resize ratio. --- src/font-ft.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) { -- 1.7.10.4