Remove duplicate ucaps code from TextServerFallback.
This commit is contained in:
parent
122106c844
commit
e144e5dda5
@ -51,7 +51,6 @@ using namespace godot;
|
|||||||
#include "core/error/error_macros.h"
|
#include "core/error/error_macros.h"
|
||||||
#include "core/string/print_string.h"
|
#include "core/string/print_string.h"
|
||||||
#include "core/string/translation.h"
|
#include "core/string/translation.h"
|
||||||
#include "core/string/ucaps.h"
|
|
||||||
|
|
||||||
#include "modules/modules_enabled.gen.h" // For freetype, msdfgen, svg.
|
#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 TextServerFallback::_string_to_upper(const String &p_string, const String &p_language) const {
|
||||||
String upper = p_string;
|
return p_string.to_upper();
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String TextServerFallback::_string_to_lower(const String &p_string, const String &p_language) const {
|
String TextServerFallback::_string_to_lower(const String &p_string, const String &p_language) const {
|
||||||
String lower = p_string;
|
return p_string.to_lower();
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PackedInt32Array TextServerFallback::_string_get_word_breaks(const String &p_string, const String &p_language, int p_chars_per_line) const {
|
PackedInt32Array TextServerFallback::_string_get_word_breaks(const String &p_string, const String &p_language, int p_chars_per_line) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user