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

[TextServer] Store font extra spacing variations without making a full copy of font.

This commit is contained in:
bruvzg
2023-09-28 10:45:09 +03:00
parent ec62b8a3ee
commit 4a167fc740
12 changed files with 411 additions and 268 deletions

View File

@@ -51,6 +51,7 @@ void TextServerExtension::_bind_methods() {
/* Font interface */
GDVIRTUAL_BIND(_create_font);
GDVIRTUAL_BIND(_create_font_linked_variation, "font_rid");
GDVIRTUAL_BIND(_font_set_data, "font_rid", "data");
GDVIRTUAL_BIND(_font_set_data_ptr, "font_rid", "data_ptr", "data_size");
@@ -412,6 +413,12 @@ RID TextServerExtension::create_font() {
return ret;
}
RID TextServerExtension::create_font_linked_variation(const RID &p_font_rid) {
RID ret;
GDVIRTUAL_CALL(_create_font_linked_variation, p_font_rid, ret);
return ret;
}
void TextServerExtension::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
GDVIRTUAL_CALL(_font_set_data, p_font_rid, p_data);
}