From 22841916dfb9ea01405da62165ebdd0050e08389 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 15 Oct 2013 07:43:30 +0200 Subject: [PATCH] Support multiple scripts. [5/7] Don't assume that fallback script has index zero. --- lib/ttfautohint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ttfautohint.c b/lib/ttfautohint.c index 6b85922..258d6d2 100644 --- a/lib/ttfautohint.c +++ b/lib/ttfautohint.c @@ -143,7 +143,8 @@ TTF_autohint(const char* options, else if (COMPARE("error-string")) error_stringp = va_arg(ap, const unsigned char**); else if (COMPARE("fallback-script")) - fallback_script = va_arg(ap, FT_UInt); + fallback_script = va_arg(ap, FT_UInt) ? TA_SCRIPT_LATN + : TA_SCRIPT_FALLBACK; else if (COMPARE("gdi-cleartype-strong-stem-width")) gdi_cleartype_strong_stem_width = (FT_Bool)va_arg(ap, FT_Int); else if (COMPARE("gray-strong-stem-width")) @@ -341,7 +342,7 @@ No_check: DUMPVAL("dw-cleartype-strong-stem-width", font->dw_cleartype_strong_stem_width); DUMPVAL("fallback-script", - font->fallback_script); + font->fallback_script != TA_SCRIPT_FALLBACK); DUMPVAL("gdi-cleartype-strong-stem-width", font->gdi_cleartype_strong_stem_width); DUMPVAL("gray-strong-stem-width", -- 2.11.4.GIT