From 98fe2f4b871a1575f54e4b5a5602a115c21b985a Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 21 Aug 2007 07:17:33 +0000 Subject: [PATCH] (ft_check_capability): Check cap->script_tag at first. --- src/font-ft.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/font-ft.c b/src/font-ft.c index 85c1298..e6f9bc2 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -2038,14 +2038,17 @@ ft_check_capability (MRealizedFont *rfont, MSymbol capability) MRealizedFontFT *ft_rfont = rfont->info; MFontCapability *cap = mfont__get_capability (capability); - if (cap->script != Mnil - && ft_check_script (ft_info, cap->script, ft_rfont->ft_face) < 0) + if (cap->script_tag) + { + if (ft_check_otf (ft_info, cap, ft_rfont->ft_face) < 0) + return -1; + } + else if (cap->script != Mnil + && ft_check_script (ft_info, cap->script, ft_rfont->ft_face) < 0) return -1; if (cap->language != Mnil && ft_check_language (ft_info, cap->language, ft_rfont->ft_face) < 0) return -1; - if (cap->script_tag && ft_check_otf (ft_info, cap, ft_rfont->ft_face) < 0) - return -1; return 0; } -- 1.7.10.4