From f4d095cdd3d04b3215d42928e6b7ac412d78c4c5 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 15 Feb 2021 10:46:23 +0200 Subject: [TextServer] Restore character and space extra spacing support. --- servers/text_server.cpp | 6 ++++++ servers/text_server.h | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'servers') 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; -- cgit v1.2.3