summaryrefslogtreecommitdiff
path: root/servers/text/text_server_extension.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/text/text_server_extension.cpp')
-rw-r--r--servers/text/text_server_extension.cpp79
1 files changed, 79 insertions, 0 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp
index c8efacc9c5..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");
@@ -67,6 +72,9 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(font_set_antialiased, "font_rid", "antialiased");
GDVIRTUAL_BIND(font_is_antialiased, "font_rid");
+ GDVIRTUAL_BIND(font_set_generate_mipmaps, "font_rid", "generate_mipmaps");
+ GDVIRTUAL_BIND(font_get_generate_mipmaps, "font_rid");
+
GDVIRTUAL_BIND(font_set_multichannel_signed_distance_field, "font_rid", "msdf");
GDVIRTUAL_BIND(font_is_multichannel_signed_distance_field, "font_rid");
@@ -151,6 +159,9 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(font_get_glyph_texture_idx, "font_rid", "size", "glyph");
GDVIRTUAL_BIND(font_set_glyph_texture_idx, "font_rid", "size", "glyph", "texture_idx");
+ GDVIRTUAL_BIND(font_get_glyph_texture_rid, "font_rid", "size", "glyph");
+ GDVIRTUAL_BIND(font_get_glyph_texture_size, "font_rid", "size", "glyph");
+
GDVIRTUAL_BIND(font_get_glyph_contours, "font_rid", "size", "index");
GDVIRTUAL_BIND(font_get_kerning_list, "font_rid", "size");
@@ -287,8 +298,12 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(strip_diacritics, "string");
+ GDVIRTUAL_BIND(string_get_word_breaks, "string", "language");
+
GDVIRTUAL_BIND(string_to_upper, "string", "language");
GDVIRTUAL_BIND(string_to_lower, "string", "language");
+
+ GDVIRTUAL_BIND(parse_structured_text, "parser_type", "args", "text");
}
bool TextServerExtension::has_feature(Feature p_feature) const {
@@ -403,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);
}
@@ -451,6 +486,18 @@ bool TextServerExtension::font_is_antialiased(const RID &p_font_rid) const {
return false;
}
+void TextServerExtension::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
+ GDVIRTUAL_CALL(font_set_generate_mipmaps, p_font_rid, p_generate_mipmaps);
+}
+
+bool TextServerExtension::font_get_generate_mipmaps(const RID &p_font_rid) const {
+ bool ret;
+ if (GDVIRTUAL_CALL(font_get_generate_mipmaps, p_font_rid, ret)) {
+ return ret;
+ }
+ return false;
+}
+
void TextServerExtension::font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {
GDVIRTUAL_CALL(font_set_multichannel_signed_distance_field, p_font_rid, p_msdf);
}
@@ -787,6 +834,22 @@ void TextServerExtension::font_set_glyph_texture_idx(const RID &p_font_rid, cons
GDVIRTUAL_CALL(font_set_glyph_texture_idx, p_font_rid, p_size, p_glyph, p_texture_idx);
}
+RID TextServerExtension::font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+ RID ret;
+ if (GDVIRTUAL_CALL(font_get_glyph_texture_rid, p_font_rid, p_size, p_glyph, ret)) {
+ return ret;
+ }
+ return RID();
+}
+
+Size2 TextServerExtension::font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+ Size2 ret;
+ if (GDVIRTUAL_CALL(font_get_glyph_texture_size, p_font_rid, p_size, p_glyph, ret)) {
+ return ret;
+ }
+ return Size2();
+}
+
Dictionary TextServerExtension::font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {
Dictionary ret;
if (GDVIRTUAL_CALL(font_get_glyph_contours, p_font_rid, p_size, p_index, ret)) {
@@ -1459,6 +1522,22 @@ String TextServerExtension::string_to_lower(const String &p_string, const String
return p_string;
}
+Array TextServerExtension::parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {
+ Array ret;
+ if (GDVIRTUAL_CALL(parse_structured_text, p_parser_type, p_args, p_text, ret)) {
+ return ret;
+ }
+ return Array();
+}
+
+PackedInt32Array TextServerExtension::string_get_word_breaks(const String &p_string, const String &p_language) const {
+ PackedInt32Array ret;
+ if (GDVIRTUAL_CALL(string_get_word_breaks, p_string, p_language, ret)) {
+ return ret;
+ }
+ return PackedInt32Array();
+}
+
TextServerExtension::TextServerExtension() {
//NOP
}