Fix support data loading with system ICU

This commit is contained in:
Pāvels Nadtočajevs
2025-07-20 21:42:20 +02:00
committed by Travis Wrightsman
parent 71a9948157
commit ed0efc4791
2 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,9 @@ if "svg" in env.module_list:
# Enable ThorVG static object linking.
env_text_server_adv.Append(CPPDEFINES=["TVG_STATIC"])
if env["builtin_icu4c"]:
env_text_server_adv.Append(CPPDEFINES=["HAVE_ICU_BUILTIN"])
if env["builtin_harfbuzz"]:
env_harfbuzz = env_modules.Clone()
env_harfbuzz.disable_warnings()

View File

@ -434,7 +434,7 @@ bool TextServerAdvanced::_has(const RID &p_rid) {
bool TextServerAdvanced::_load_support_data(const String &p_filename) {
_THREAD_SAFE_METHOD_
#ifdef ICU_STATIC_DATA
#if defined(ICU_STATIC_DATA) || !defined(HAVE_ICU_BUILTIN)
if (!icu_data_loaded) {
UErrorCode err = U_ZERO_ERROR;
u_init(&err); // Do not check for errors, since we only load part of the data.