mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
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:
commit
26e7b6bdd6
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")) {
|
||||
|
|
|
|||
|
|
@ -735,6 +735,7 @@ public:
|
|||
MODBIND0RC(String, get_support_data_filename);
|
||||
MODBIND0RC(String, get_support_data_info);
|
||||
MODBIND1RC(bool, save_support_data, const String &);
|
||||
MODBIND0RC(PackedByteArray, get_support_data);
|
||||
|
||||
MODBIND1RC(bool, is_locale_right_to_left, const String &);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue