diff options
Diffstat (limited to 'servers/text/text_server_extension.cpp')
-rw-r--r-- | servers/text/text_server_extension.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp index 0a7523e33a..d6d98b4f8f 100644 --- a/servers/text/text_server_extension.cpp +++ b/servers/text/text_server_extension.cpp @@ -260,6 +260,7 @@ void TextServerExtension::_bind_methods() { GDVIRTUAL_BIND(_shaped_text_draw, "shaped", "canvas", "pos", "clip_l", "clip_r", "color"); GDVIRTUAL_BIND(_shaped_text_draw_outline, "shaped", "canvas", "pos", "clip_l", "clip_r", "outline_size", "color"); + GDVIRTUAL_BIND(_shaped_text_get_grapheme_bounds, "shaped", "pos"); GDVIRTUAL_BIND(_shaped_text_next_grapheme_pos, "shaped", "pos"); GDVIRTUAL_BIND(_shaped_text_prev_grapheme_pos, "shaped", "pos"); @@ -1292,6 +1293,14 @@ void TextServerExtension::shaped_text_draw_outline(RID p_shaped, RID p_canvas, c shaped_text_draw_outline(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color); } +Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(RID p_shaped, int p_pos) const { + Vector2 ret; + if (GDVIRTUAL_CALL(_shaped_text_get_grapheme_bounds, p_shaped, p_pos, ret)) { + return ret; + } + return TextServer::shaped_text_get_grapheme_bounds(p_shaped, p_pos); +} + int TextServerExtension::shaped_text_next_grapheme_pos(RID p_shaped, int p_pos) const { int ret; if (GDVIRTUAL_CALL(_shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) { |