You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer.
This commit is contained in:
@@ -418,7 +418,7 @@ struct _VariantCall {
|
||||
String s;
|
||||
if (p_instance->size() > 0) {
|
||||
const uint8_t *r = p_instance->ptr();
|
||||
s.parse_utf16((const char16_t *)r, p_instance->size() / 2);
|
||||
s.parse_utf16((const char16_t *)r, floor((double)p_instance->size() / (double)sizeof(char16_t)));
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ struct _VariantCall {
|
||||
String s;
|
||||
if (p_instance->size() > 0) {
|
||||
const uint8_t *r = p_instance->ptr();
|
||||
s = String((const char32_t *)r, p_instance->size() / 4);
|
||||
s = String((const char32_t *)r, floor((double)p_instance->size() / (double)sizeof(char32_t)));
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user