summaryrefslogtreecommitdiff
path: root/servers/text/text_server_extension.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-13 10:20:02 +0100
committerGitHub <noreply@github.com>2022-01-13 10:20:02 +0100
commita987ebfde2810fb5092437b0ffd1ee3c2f54e7c9 (patch)
tree2a5898b52e4d97b647d5da9b99537bfdb9a2a83d /servers/text/text_server_extension.cpp
parent8fce6166cbc635b069c09b782ea67c495348abcb (diff)
parentbaec983d8ab1877768eab3cd122566f05b4bce26 (diff)
Merge pull request #56714 from bruvzg/fix_alignment_break_overrun
Diffstat (limited to 'servers/text/text_server_extension.cpp')
-rw-r--r--servers/text/text_server_extension.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp
index a51b62e730..a2195d1ddf 100644
--- a/servers/text/text_server_extension.cpp
+++ b/servers/text/text_server_extension.cpp
@@ -194,6 +194,7 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(_shaped_text_set_direction, "shaped", "direction");
GDVIRTUAL_BIND(_shaped_text_get_direction, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_inferred_direction, "shaped");
GDVIRTUAL_BIND(_shaped_text_set_bidi_override, "shaped", "override");
@@ -954,6 +955,14 @@ TextServer::Direction TextServerExtension::shaped_text_get_direction(RID p_shape
return TextServer::Direction::DIRECTION_AUTO;
}
+TextServer::Direction TextServerExtension::shaped_text_get_inferred_direction(RID p_shaped) const {
+ int ret;
+ if (GDVIRTUAL_CALL(_shaped_text_get_inferred_direction, p_shaped, ret)) {
+ return (TextServer::Direction)ret;
+ }
+ return TextServer::Direction::DIRECTION_LTR;
+}
+
void TextServerExtension::shaped_text_set_orientation(RID p_shaped, TextServer::Orientation p_orientation) {
GDVIRTUAL_CALL(_shaped_text_set_orientation, p_shaped, p_orientation);
}