mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer.
This commit is contained in:
parent
a8c2cc9028
commit
493da99269
28 changed files with 5442 additions and 16 deletions
|
|
@ -209,7 +209,6 @@ void CharString::copy_from(const char *p_cstr) {
|
|||
/* String */
|
||||
/*************************************************************************/
|
||||
|
||||
//TODO: move to TextServer
|
||||
//kind of poor should be rewritten properly
|
||||
String String::word_wrap(int p_chars_per_line) const {
|
||||
int from = 0;
|
||||
|
|
@ -4796,7 +4795,7 @@ Vector<uint8_t> String::to_utf16_buffer() const {
|
|||
Char16String charstr = s->utf16();
|
||||
|
||||
Vector<uint8_t> retval;
|
||||
size_t len = charstr.length() * 2;
|
||||
size_t len = charstr.length() * sizeof(char16_t);
|
||||
retval.resize(len);
|
||||
uint8_t *w = retval.ptrw();
|
||||
copymem(w, (const void *)charstr.ptr(), len);
|
||||
|
|
@ -4811,7 +4810,7 @@ Vector<uint8_t> String::to_utf32_buffer() const {
|
|||
}
|
||||
|
||||
Vector<uint8_t> retval;
|
||||
size_t len = s->length() * 4;
|
||||
size_t len = s->length() * sizeof(char32_t);
|
||||
retval.resize(len);
|
||||
uint8_t *w = retval.ptrw();
|
||||
copymem(w, (const void *)s->ptr(), len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue