From 6f18554bb2633c08b0c5d3008df49c46f886f06f Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 18 Nov 2005 10:58:02 +0000 Subject: [PATCH] (ft_check_otf): Define only when HAVE_OTF is defined. (ft_list_capability): Call ft_check_otf only when HAVE_OTF is defined. (ft_select): Likewise. --- src/font-ft.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/font-ft.c b/src/font-ft.c index 4cb3b47..d693a2e 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -898,6 +898,7 @@ ft_list_script (MSymbol script) return (plist); } +#ifdef HAVE_OTF static int ft_check_otf (MFontFT *ft_info, MFontCapability *cap) { @@ -930,6 +931,7 @@ ft_check_otf (MFontFT *ft_info, MFontCapability *cap) return -1; return 0; } +#endif /* HAVE_OTF */ static int ft_check_lang (MFontFT *ft_info, MFontCapability *cap) @@ -1074,8 +1076,10 @@ ft_list_capability (MSymbol sym) if (pl) MPLIST_DO (pl, pl) { +#ifdef HAVE_OTF if (cap->script_tag && ft_check_otf (MPLIST_VAL (pl), cap) < 0) continue; +#endif /* HAVE_OTF */ if (cap->lang && ft_check_lang (MPLIST_VAL (pl), cap) < 0) continue; if (! plist) @@ -1220,8 +1224,14 @@ ft_select (MFrame *frame, MFont *font, int limited_size) for (pl = plist; ! MPLIST_TAIL_P (pl);) { - if ((cap->script_tag && ft_check_otf (MPLIST_VAL (pl), cap) < 0) - || (cap->lang && ft_check_lang (MPLIST_VAL (pl), cap) < 0)) +#ifdef HAVE_OTF + if (cap->script_tag && ft_check_otf (MPLIST_VAL (pl), cap) < 0) + { + mplist_pop (pl); + continue; + } +#endif /* HAVE_OTF */ + if (cap->lang && ft_check_lang (MPLIST_VAL (pl), cap) < 0) mplist_pop (pl); else pl = MPLIST_NEXT (pl); -- 1.7.10.4