From a85886fc77083084e9a12ee15b47eab7876f9f53 Mon Sep 17 00:00:00 2001 From: Victor Chang Date: Tue, 27 Nov 2018 11:34:56 +0000 Subject: [PATCH] Replace @Deprecated ICU API - USCRIPT_CODE_LIMIT Use of the deprecated API USCRIPT_CODE_LIMIT prevents harfbuzz using the ICU4C as a shared library. The API has been replaced by u_getIntPropertyMaxValue(UCHAR_SCRIPT) --- src/hb-icu.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-icu.cc b/src/hb-icu.cc index 4e51eb0..8ee49c2 100644 --- a/src/hb-icu.cc +++ b/src/hb-icu.cc @@ -65,7 +65,8 @@ hb_icu_script_from_script (hb_script_t script) if (unlikely (script == HB_SCRIPT_INVALID)) return USCRIPT_INVALID_CODE; - for (unsigned int i = 0; i < USCRIPT_CODE_LIMIT; i++) + unsigned int maxScriptCode = u_getIntPropertyMaxValue(UCHAR_SCRIPT); + for (unsigned int i = 0; i <= maxScriptCode; i++) if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script)) return (UScriptCode) i; -- 2.7.4