diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-13 11:13:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 11:13:05 +0200 |
commit | 136f84fc3549fa22b700d80f86216c484174ffb6 (patch) | |
tree | c162d7045779cd4d03a50607e8a24cc265dcda75 /servers | |
parent | e95f4eb5a7d9bf644cb0aea218683d522297ae83 (diff) | |
parent | 6e4cdad3ac5b0eac89a381575ec297912c330bec (diff) |
Merge pull request #61772 from bruvzg/ft_ot_collect
Diffstat (limited to 'servers')
-rw-r--r-- | servers/text/text_server_extension.cpp | 25 | ||||
-rw-r--r-- | servers/text/text_server_extension.h | 8 | ||||
-rw-r--r-- | servers/text_server.cpp | 5 | ||||
-rw-r--r-- | servers/text_server.h | 5 |
4 files changed, 43 insertions, 0 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp index 005cb68302..e9a558ac5f 100644 --- a/servers/text/text_server_extension.cpp +++ b/servers/text/text_server_extension.cpp @@ -55,6 +55,11 @@ void TextServerExtension::_bind_methods() { GDVIRTUAL_BIND(font_set_data, "font_rid", "data"); GDVIRTUAL_BIND(font_set_data_ptr, "font_rid", "data_ptr", "data_size"); + GDVIRTUAL_BIND(font_set_face_index, "font_rid", "face_index"); + GDVIRTUAL_BIND(font_get_face_index, "font_rid"); + + GDVIRTUAL_BIND(font_get_face_count, "font_rid"); + GDVIRTUAL_BIND(font_set_style, "font_rid", "style"); GDVIRTUAL_BIND(font_get_style, "font_rid"); @@ -413,6 +418,26 @@ void TextServerExtension::font_set_data_ptr(const RID &p_font_rid, const uint8_t GDVIRTUAL_CALL(font_set_data_ptr, p_font_rid, p_data_ptr, p_data_size); } +void TextServerExtension::font_set_face_index(const RID &p_font_rid, int64_t p_index) { + GDVIRTUAL_CALL(font_set_face_index, p_font_rid, p_index); +} + +int64_t TextServerExtension::font_get_face_index(const RID &p_font_rid) const { + int64_t ret; + if (GDVIRTUAL_CALL(font_get_face_index, p_font_rid, ret)) { + return ret; + } + return 0; +} + +int64_t TextServerExtension::font_get_face_count(const RID &p_font_rid) const { + int64_t ret; + if (GDVIRTUAL_CALL(font_get_face_count, p_font_rid, ret)) { + return ret; + } + return 0; +} + void TextServerExtension::font_set_style(const RID &p_font_rid, int64_t /*FontStyle*/ p_style) { GDVIRTUAL_CALL(font_set_style, p_font_rid, p_style); } diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h index 7b7fc61ed7..9ca0939247 100644 --- a/servers/text/text_server_extension.h +++ b/servers/text/text_server_extension.h @@ -84,6 +84,14 @@ public: GDVIRTUAL2(font_set_data, RID, const PackedByteArray &); GDVIRTUAL3(font_set_data_ptr, RID, GDNativeConstPtr<const uint8_t>, int64_t); + virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) override; + virtual int64_t font_get_face_index(const RID &p_font_rid) const override; + GDVIRTUAL2(font_set_face_index, RID, int64_t); + GDVIRTUAL1RC(int64_t, font_get_face_index, RID); + + virtual int64_t font_get_face_count(const RID &p_font_rid) const override; + GDVIRTUAL1RC(int64_t, font_get_face_count, RID); + virtual void font_set_style(const RID &p_font_rid, int64_t /*FontStyle*/ p_style) override; virtual int64_t /*FontStyle*/ font_get_style(const RID &p_font_rid) const override; GDVIRTUAL2(font_set_style, RID, int64_t); diff --git a/servers/text_server.cpp b/servers/text_server.cpp index 20e62037e6..41d9c74d82 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -208,6 +208,11 @@ void TextServer::_bind_methods() { ClassDB::bind_method(D_METHOD("font_set_data", "font_rid", "data"), &TextServer::font_set_data); + ClassDB::bind_method(D_METHOD("font_set_face_index", "font_rid", "face_index"), &TextServer::font_set_face_index); + ClassDB::bind_method(D_METHOD("font_get_face_index", "font_rid"), &TextServer::font_get_face_index); + + ClassDB::bind_method(D_METHOD("font_get_face_count", "font_rid"), &TextServer::font_get_face_count); + ClassDB::bind_method(D_METHOD("font_set_style", "font_rid", "style"), &TextServer::font_set_style); ClassDB::bind_method(D_METHOD("font_get_style", "font_rid"), &TextServer::font_get_style); diff --git a/servers/text_server.h b/servers/text_server.h index f96146a549..a67ad8fc9e 100644 --- a/servers/text_server.h +++ b/servers/text_server.h @@ -189,6 +189,11 @@ public: virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) = 0; virtual void font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) = 0; + virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) = 0; + virtual int64_t font_get_face_index(const RID &p_font_rid) const = 0; + + virtual int64_t font_get_face_count(const RID &p_font_rid) const = 0; + virtual void font_set_style(const RID &p_font_rid, int64_t /*FontStyle*/ p_style) = 0; virtual int64_t /*FontStyle*/ font_get_style(const RID &p_font_rid) const = 0; |