summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-01-23 21:10:42 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-01-23 21:13:32 +0200
commit15dafc49d3cd0534c44fa568febfad4ac63c5a07 (patch)
tree01cd393efb09a4deee41973c08444bcb34b109cd /main
parentc06df6779ae8c3145cd7be727102663ccae568e9 (diff)
[TextServer] Fix ICU data loading and exporting with `internationalization/locale/include_text_server_data` setting.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index cfde124b90..eff30bee9b 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -524,7 +524,11 @@ Error Main::test_setup() {
}
}
if (text_driver_idx >= 0) {
- TextServerManager::get_singleton()->set_primary_interface(TextServerManager::get_singleton()->get_interface(text_driver_idx));
+ Ref<TextServer> ts = TextServerManager::get_singleton()->get_interface(text_driver_idx);
+ TextServerManager::get_singleton()->set_primary_interface(ts);
+ if (ts->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA)) {
+ ts->load_support_data("res://" + ts->get_support_data_filename());
+ }
} else {
ERR_FAIL_V_MSG(ERR_CANT_CREATE, "TextServer: Unable to create TextServer interface.");
}
@@ -2238,7 +2242,11 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
}
if (text_driver_idx >= 0) {
- TextServerManager::get_singleton()->set_primary_interface(TextServerManager::get_singleton()->get_interface(text_driver_idx));
+ Ref<TextServer> ts = TextServerManager::get_singleton()->get_interface(text_driver_idx);
+ TextServerManager::get_singleton()->set_primary_interface(ts);
+ if (ts->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA)) {
+ ts->load_support_data("res://" + ts->get_support_data_filename());
+ }
} else {
ERR_FAIL_V_MSG(ERR_CANT_CREATE, "TextServer: Unable to create TextServer interface.");
}