diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-02-15 10:46:23 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-02-15 10:46:23 +0200 |
commit | f4d095cdd3d04b3215d42928e6b7ac412d78c4c5 (patch) | |
tree | c7f72b7c756139f950c95c705ed35ae8d62b4024 /servers | |
parent | 8fa92c70eacd180866535a42d409e1c9e1074d73 (diff) |
[TextServer] Restore character and space extra spacing support.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/text_server.cpp | 6 | ||||
-rw-r--r-- | servers/text_server.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/servers/text_server.cpp b/servers/text_server.cpp index da68ceb128..755a17f86a 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -227,6 +227,12 @@ void TextServer::_bind_methods() { ClassDB::bind_method(D_METHOD("font_get_underline_position", "font", "size"), &TextServer::font_get_underline_position); ClassDB::bind_method(D_METHOD("font_get_underline_thickness", "font", "size"), &TextServer::font_get_underline_thickness); + ClassDB::bind_method(D_METHOD("font_get_spacing_space", "font"), &TextServer::font_get_spacing_space); + ClassDB::bind_method(D_METHOD("font_set_spacing_space", "font", "value"), &TextServer::font_set_spacing_space); + + ClassDB::bind_method(D_METHOD("font_get_spacing_glyph", "font"), &TextServer::font_get_spacing_glyph); + ClassDB::bind_method(D_METHOD("font_set_spacing_glyph", "font", "value"), &TextServer::font_set_spacing_glyph); + ClassDB::bind_method(D_METHOD("font_set_antialiased", "font", "antialiased"), &TextServer::font_set_antialiased); ClassDB::bind_method(D_METHOD("font_get_antialiased", "font"), &TextServer::font_get_antialiased); diff --git a/servers/text_server.h b/servers/text_server.h index 23367de4c8..3268741a74 100644 --- a/servers/text_server.h +++ b/servers/text_server.h @@ -241,6 +241,12 @@ public: virtual float font_get_ascent(RID p_font, int p_size) const = 0; virtual float font_get_descent(RID p_font, int p_size) const = 0; + virtual int font_get_spacing_space(RID p_font) const = 0; + virtual void font_set_spacing_space(RID p_font, int p_value) = 0; + + virtual int font_get_spacing_glyph(RID p_font) const = 0; + virtual void font_set_spacing_glyph(RID p_font, int p_value) = 0; + virtual float font_get_underline_position(RID p_font, int p_size) const = 0; virtual float font_get_underline_thickness(RID p_font, int p_size) const = 0; |