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)
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 @@
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;