diff options
Diffstat (limited to 'servers/text')
-rw-r--r-- | servers/text/text_server_extension.cpp | 19 | ||||
-rw-r--r-- | servers/text/text_server_extension.h | 9 |
2 files changed, 24 insertions, 4 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp index 5f83fc4206..a51b62e730 100644 --- a/servers/text/text_server_extension.cpp +++ b/servers/text/text_server_extension.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -174,6 +174,9 @@ void TextServerExtension::_bind_methods() { GDVIRTUAL_BIND(_font_remove_script_support_override, "font_rid", "script"); GDVIRTUAL_BIND(_font_get_script_support_overrides, "font_rid"); + GDVIRTUAL_BIND(_font_set_opentype_feature_overrides, "font_rid", "overrides"); + GDVIRTUAL_BIND(_font_get_opentype_feature_overrides, "font_rid"); + GDVIRTUAL_BIND(_font_supported_feature_list, "font_rid"); GDVIRTUAL_BIND(_font_supported_variation_list, "font_rid"); @@ -869,6 +872,18 @@ Vector<String> TextServerExtension::font_get_script_support_overrides(RID p_font return Vector<String>(); } +void TextServerExtension::font_set_opentype_feature_overrides(RID p_font_rid, const Dictionary &p_overrides) { + GDVIRTUAL_CALL(_font_set_opentype_feature_overrides, p_font_rid, p_overrides); +} + +Dictionary TextServerExtension::font_get_opentype_feature_overrides(RID p_font_rid) const { + Dictionary ret; + if (GDVIRTUAL_CALL(_font_get_opentype_feature_overrides, p_font_rid, ret)) { + return ret; + } + return Dictionary(); +} + Dictionary TextServerExtension::font_supported_feature_list(RID p_font_rid) const { Dictionary ret; if (GDVIRTUAL_CALL(_font_supported_feature_list, p_font_rid, ret)) { diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h index 91d1a6b97e..9b456c2dd7 100644 --- a/servers/text/text_server_extension.h +++ b/servers/text/text_server_extension.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -285,6 +285,11 @@ public: GDVIRTUAL2(_font_remove_script_support_override, RID, const String &); GDVIRTUAL1R(Vector<String>, _font_get_script_support_overrides, RID); + virtual void font_set_opentype_feature_overrides(RID p_font_rid, const Dictionary &p_overrides) override; + virtual Dictionary font_get_opentype_feature_overrides(RID p_font_rid) const override; + GDVIRTUAL2(_font_set_opentype_feature_overrides, RID, const Dictionary &); + GDVIRTUAL1RC(Dictionary, _font_get_opentype_feature_overrides, RID); + virtual Dictionary font_supported_feature_list(RID p_font_rid) const override; virtual Dictionary font_supported_variation_list(RID p_font_rid) const override; GDVIRTUAL1RC(Dictionary, _font_supported_feature_list, RID); |