Merge pull request #99164 from bruvzg/int_files

[Export] Write text server data from memory, instead of using temporary file.
This commit is contained in:
Thaddeus Crews
2024-12-03 14:40:58 -06:00
13 changed files with 88 additions and 19 deletions
@@ -500,6 +500,20 @@ bool TextServerAdvanced::_save_support_data(const String &p_filename) const {
#endif
}
PackedByteArray TextServerAdvanced::_get_support_data() const {
_THREAD_SAFE_METHOD_
#ifdef ICU_STATIC_DATA
PackedByteArray icu_data_static;
icu_data_static.resize(U_ICUDATA_SIZE);
memcpy(icu_data_static.ptrw(), U_ICUDATA_ENTRY_POINT, U_ICUDATA_SIZE);
return icu_data_static;
#else
return icu_data;
#endif
}
bool TextServerAdvanced::_is_locale_right_to_left(const String &p_locale) const {
String l = p_locale.get_slicec('_', 0);
if ((l == "ar") || (l == "dv") || (l == "he") || (l == "fa") || (l == "ff") || (l == "ku") || (l == "ur")) {