You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Merge pull request #80650 from bruvzg/comp_char_fix
[TextServer] Fix system font fallback and caret/selection behavior for composite characters.
This commit is contained in:
@@ -4079,6 +4079,20 @@ double TextServerFallback::_shaped_text_get_underline_thickness(const RID &p_sha
|
||||
return sd->uthk;
|
||||
}
|
||||
|
||||
PackedInt32Array TextServerFallback::_shaped_text_get_character_breaks(const RID &p_shaped) const {
|
||||
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
|
||||
ERR_FAIL_COND_V(!sd, PackedInt32Array());
|
||||
|
||||
MutexLock lock(sd->mutex);
|
||||
|
||||
PackedInt32Array ret;
|
||||
ret.resize(sd->end - sd->start);
|
||||
for (int i = sd->start; i < sd->end; i++) {
|
||||
ret.write[i] = i;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
String TextServerFallback::_string_to_upper(const String &p_string, const String &p_language) const {
|
||||
return p_string.to_upper();
|
||||
}
|
||||
|
||||
@@ -788,6 +788,8 @@ public:
|
||||
MODBIND1RC(double, shaped_text_get_underline_position, const RID &);
|
||||
MODBIND1RC(double, shaped_text_get_underline_thickness, const RID &);
|
||||
|
||||
MODBIND1RC(PackedInt32Array, shaped_text_get_character_breaks, const RID &);
|
||||
|
||||
MODBIND3RC(PackedInt32Array, string_get_word_breaks, const String &, const String &, int64_t);
|
||||
|
||||
MODBIND2RC(String, string_to_upper, const String &, const String &);
|
||||
|
||||
Reference in New Issue
Block a user