1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

[TextServer] Improve embedded objects handling performance.

This commit is contained in:
bruvzg
2024-09-26 09:37:47 +03:00
committed by Pāvels Nadtočajevs
parent 4cf02312f6
commit cc1db569e1
15 changed files with 242 additions and 89 deletions

View File

@@ -268,6 +268,7 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_shaped_get_span_count, "shaped");
GDVIRTUAL_BIND(_shaped_get_span_meta, "shaped", "index");
GDVIRTUAL_BIND(_shaped_get_span_embedded_object, "shaped", "index");
GDVIRTUAL_BIND(_shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");
GDVIRTUAL_BIND(_shaped_text_substr, "shaped", "start", "length");
@@ -1187,11 +1188,17 @@ int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {
}
Variant TextServerExtension::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
Variant ret = false;
Variant ret;
GDVIRTUAL_CALL(_shaped_get_span_meta, p_shaped, p_index, ret);
return ret;
}
Variant TextServerExtension::shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const {
Variant ret;
GDVIRTUAL_CALL(_shaped_get_span_embedded_object, p_shaped, p_index, ret);
return ret;
}
void TextServerExtension::shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
GDVIRTUAL_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);
}