summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-15 11:10:42 +0100
committerGitHub <noreply@github.com>2021-02-15 11:10:42 +0100
commitd8691e8ce28fd6899a20bdf76623ee1471862bab (patch)
treefe968dab5b461a24f61f1a0f2c6f98b42b16db93 /servers
parentfa06d3cf6303506e8d65fe23f9f3c71e49960b88 (diff)
parentf4d095cdd3d04b3215d42928e6b7ac412d78c4c5 (diff)
Merge pull request #46043 from bruvzg/restore_char_and_space_extra_spacing
[TextServer] Restore character and space extra spacing support.
Diffstat (limited to 'servers')
-rw-r--r--servers/text_server.cpp6
-rw-r--r--servers/text_server.h6
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;