diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-19 19:32:58 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-19 19:32:58 +0100 |
commit | 35cba7b21e867da52c86762275d2a22c023c91a0 (patch) | |
tree | d078c6dcbe45bb55be54b78696b8889e7aa138c2 | |
parent | 4ca6a9809d54aafcb9887cec037ee1f3947fdf02 (diff) | |
parent | e144e5dda5b26c54dcde35b5e8141d3927030075 (diff) |
Merge pull request #71674 from bruvzg/fb_ts_remove_ucaps
Remove duplicate ucaps code from TextServerFallback.
-rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index ece34f56d6..d08666482d 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -51,7 +51,6 @@ using namespace godot; #include "core/error/error_macros.h" #include "core/string/print_string.h" #include "core/string/translation.h" -#include "core/string/ucaps.h" #include "modules/modules_enabled.gen.h" // For freetype, msdfgen, svg. @@ -4060,31 +4059,11 @@ double TextServerFallback::_shaped_text_get_underline_thickness(const RID &p_sha } String TextServerFallback::_string_to_upper(const String &p_string, const String &p_language) const { - String upper = p_string; - - for (int i = 0; i <= upper.length(); i++) { - const char32_t s = upper[i]; - const char32_t t = _find_upper(s); - if (s != t) { // avoid copy on write - upper[i] = t; - } - } - - return upper; + return p_string.to_upper(); } String TextServerFallback::_string_to_lower(const String &p_string, const String &p_language) const { - String lower = p_string; - - for (int i = 0; i <= lower.length(); i++) { - const char32_t s = lower[i]; - const char32_t t = _find_lower(s); - if (s != t) { // avoid copy on write - lower[i] = t; - } - } - - return lower; + return p_string.to_lower(); } PackedInt32Array TextServerFallback::_string_get_word_breaks(const String &p_string, const String &p_language, int p_chars_per_line) const { |