summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-28 12:12:29 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-28 12:12:29 +0200
commit14e1f36e614686f3fea0c74fac3624d1027dd5cc (patch)
tree7bc511bc13f83cf1cef3aebf32a979d528205768
parentff8e24098f01eacea7ef1323afd7866858f892fc (diff)
parent8f5d56e04a60020ec8a6db2aebc9bf9bbaf727d1 (diff)
Merge pull request #66492 from bruvzg/gde_ts_underscr
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions.
-rw-r--r--core/extension/make_wrappers.py83
-rw-r--r--doc/classes/TextServer.xml2
-rw-r--r--doc/classes/TextServerExtension.xml587
-rw-r--r--modules/text_server_adv/text_server_adv.cpp494
-rw-r--r--modules/text_server_adv/text_server_adv.h348
-rw-r--r--modules/text_server_fb/text_server_fb.cpp476
-rw-r--r--modules/text_server_fb/text_server_fb.h336
-rw-r--r--servers/text/text_server_extension.cpp752
-rw-r--r--servers/text/text_server_extension.h379
-rw-r--r--servers/text_server.cpp1
-rw-r--r--servers/text_server.h5
-rw-r--r--tests/core/object/test_class_db.h4
12 files changed, 1677 insertions, 1790 deletions
diff --git a/core/extension/make_wrappers.py b/core/extension/make_wrappers.py
index 862d313fba..1e4634ad2c 100644
--- a/core/extension/make_wrappers.py
+++ b/core/extension/make_wrappers.py
@@ -1,4 +1,60 @@
-proto = """
+proto_mod = """
+#define MODBIND$VER($RETTYPE m_name$ARG) \\
+virtual $RETVAL _##m_name($FUNCARGS) $CONST; \\
+_FORCE_INLINE_ virtual $RETVAL m_name($FUNCARGS) $CONST override { \\
+ $RETX _##m_name($CALLARGS);\\
+}
+"""
+
+
+def generate_mod_version(argcount, const=False, returns=False):
+ s = proto_mod
+ sproto = str(argcount)
+ method_info = ""
+ if returns:
+ sproto += "R"
+ s = s.replace("$RETTYPE", "m_ret, ")
+ s = s.replace("$RETVAL", "m_ret")
+ s = s.replace("$RETX", "return")
+
+ else:
+ s = s.replace("$RETTYPE", "")
+ s = s.replace("$RETVAL", "void")
+ s = s.replace("$RETX", "")
+
+ if const:
+ sproto += "C"
+ s = s.replace("$CONST", "const")
+ else:
+ s = s.replace("$CONST", "")
+
+ s = s.replace("$VER", sproto)
+ argtext = ""
+ funcargs = ""
+ callargs = ""
+
+ for i in range(argcount):
+ if i > 0:
+ funcargs += ", "
+ callargs += ", "
+
+ argtext += ", m_type" + str(i + 1)
+ funcargs += "m_type" + str(i + 1) + " arg" + str(i + 1)
+ callargs += "arg" + str(i + 1)
+
+ if argcount:
+ s = s.replace("$ARG", argtext)
+ s = s.replace("$FUNCARGS", funcargs)
+ s = s.replace("$CALLARGS", callargs)
+ else:
+ s = s.replace("$ARG", "")
+ s = s.replace("$FUNCARGS", funcargs)
+ s = s.replace("$CALLARGS", callargs)
+
+ return s
+
+
+proto_ex = """
#define EXBIND$VER($RETTYPE m_name$ARG) \\
GDVIRTUAL$VER($RETTYPE_##m_name$ARG)\\
virtual $RETVAL m_name($FUNCARGS) $CONST override { \\
@@ -9,8 +65,8 @@ virtual $RETVAL m_name($FUNCARGS) $CONST override { \\
"""
-def generate_version(argcount, const=False, returns=False):
- s = proto
+def generate_ex_version(argcount, const=False, returns=False):
+ s = proto_ex
sproto = str(argcount)
method_info = ""
if returns:
@@ -63,25 +119,28 @@ def generate_version(argcount, const=False, returns=False):
def run(target, source, env):
-
max_versions = 12
txt = """
#ifndef GDEXTENSION_WRAPPERS_GEN_H
#define GDEXTENSION_WRAPPERS_GEN_H
-
-
"""
for i in range(max_versions + 1):
+ txt += "\n/* Extension Wrapper " + str(i) + " Arguments */\n"
+ txt += generate_ex_version(i, False, False)
+ txt += generate_ex_version(i, False, True)
+ txt += generate_ex_version(i, True, False)
+ txt += generate_ex_version(i, True, True)
- txt += "/* " + str(i) + " Arguments */\n\n"
- txt += generate_version(i, False, False)
- txt += generate_version(i, False, True)
- txt += generate_version(i, True, False)
- txt += generate_version(i, True, True)
+ for i in range(max_versions + 1):
+ txt += "\n/* Module Wrapper " + str(i) + " Arguments */\n"
+ txt += generate_mod_version(i, False, False)
+ txt += generate_mod_version(i, False, True)
+ txt += generate_mod_version(i, True, False)
+ txt += generate_mod_version(i, True, True)
- txt += "#endif"
+ txt += "\n#endif\n"
with open(target[0], "w") as f:
f.write(txt)
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 2e67c61e54..2512c563c5 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -1565,6 +1565,8 @@
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value="4" enum="FontLCDSubpixelLayout">
Vertical BGR sub-pixel layout.
</constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_MAX" value="5" enum="FontLCDSubpixelLayout">
+ </constant>
<constant name="DIRECTION_AUTO" value="0" enum="Direction">
Text direction is determined based on contents and current locale.
</constant>
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 4886bf0757..37d2698dd4 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -9,21 +9,19 @@
<tutorials>
</tutorials>
<methods>
- <method name="create_font" qualifiers="virtual">
+ <method name="_create_font" qualifiers="virtual">
<return type="RID" />
<description>
- Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method.
</description>
</method>
- <method name="create_shaped_text" qualifiers="virtual">
+ <method name="_create_shaped_text" qualifiers="virtual">
<return type="RID" />
<param index="0" name="direction" type="int" enum="TextServer.Direction" />
<param index="1" name="orientation" type="int" enum="TextServer.Orientation" />
<description>
- Creates new buffer for complex text layout, with the given [param direction] and [param orientation]. To free the resulting buffer, use [method free_rid] method.
</description>
</method>
- <method name="draw_hex_code_box" qualifiers="virtual const">
+ <method name="_draw_hex_code_box" qualifiers="virtual const">
<return type="void" />
<param index="0" name="canvas" type="RID" />
<param index="1" name="size" type="int" />
@@ -31,42 +29,36 @@
<param index="3" name="index" type="int" />
<param index="4" name="color" type="Color" />
<description>
- Draws box displaying character hexadecimal code. Used for replacing missing characters.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="font_clear_glyphs" qualifiers="virtual">
+ <method name="_font_clear_glyphs" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Removes all rendered glyphs information from the cache entry.
</description>
</method>
- <method name="font_clear_kerning_map" qualifiers="virtual">
+ <method name="_font_clear_kerning_map" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Removes all kerning overrides.
</description>
</method>
- <method name="font_clear_size_cache" qualifiers="virtual">
+ <method name="_font_clear_size_cache" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<description>
- Removes all font sizes from the cache entry.
</description>
</method>
- <method name="font_clear_textures" qualifiers="virtual">
+ <method name="_font_clear_textures" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Removes all textures from font cache entry.
</description>
</method>
- <method name="font_draw_glyph" qualifiers="virtual const">
+ <method name="_font_draw_glyph" qualifiers="virtual const">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -75,10 +67,9 @@
<param index="4" name="index" type="int" />
<param index="5" name="color" type="Color" />
<description>
- Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size].
</description>
</method>
- <method name="font_draw_glyph_outline" qualifiers="virtual const">
+ <method name="_font_draw_glyph_outline" qualifiers="virtual const">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -88,897 +79,779 @@
<param index="5" name="index" type="int" />
<param index="6" name="color" type="Color" />
<description>
- Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size].
</description>
</method>
- <method name="font_get_antialiasing" qualifiers="virtual const">
+ <method name="_font_get_antialiasing" qualifiers="virtual const">
<return type="int" enum="TextServer.FontAntialiasing" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font anti-aliasing mode.
</description>
</method>
- <method name="font_get_ascent" qualifiers="virtual const">
+ <method name="_font_get_ascent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_get_descent" qualifiers="virtual const">
+ <method name="_font_get_descent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_get_embolden" qualifiers="virtual const">
+ <method name="_font_get_embolden" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font embolden strength.
</description>
</method>
- <method name="font_get_face_count" qualifiers="virtual const">
+ <method name="_font_get_face_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns number of faces in the TrueType / OpenType collection.
</description>
</method>
- <method name="font_get_face_index" qualifiers="virtual const">
+ <method name="_font_get_face_index" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns an active face index in the TrueType / OpenType collection.
</description>
</method>
- <method name="font_get_fixed_size" qualifiers="virtual const">
+ <method name="_font_get_fixed_size" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns bitmap font fixed size.
</description>
</method>
- <method name="font_get_generate_mipmaps" qualifiers="virtual const">
+ <method name="_font_get_generate_mipmaps" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if font texture mipmap generation is enabled.
</description>
</method>
- <method name="font_get_global_oversampling" qualifiers="virtual const">
+ <method name="_font_get_global_oversampling" qualifiers="virtual const">
<return type="float" />
<description>
- Returns the font oversampling factor, shared by all fonts in the TextServer.
</description>
</method>
- <method name="font_get_glyph_advance" qualifiers="virtual const">
+ <method name="_font_get_glyph_advance" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph" type="int" />
<description>
- Returns glyph advance (offset of the next glyph).
</description>
</method>
- <method name="font_get_glyph_contours" qualifiers="virtual const">
+ <method name="_font_get_glyph_contours" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="index" type="int" />
<description>
- Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
- [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum TextServer.ContourPointTag] values.
- [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
- [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
</description>
</method>
- <method name="font_get_glyph_index" qualifiers="virtual const">
+ <method name="_font_get_glyph_index" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="char" type="int" />
<param index="3" name="variation_selector" type="int" />
<description>
- Returns the glyph index of a [param char], optionally modified by the [param variation_selector].
</description>
</method>
- <method name="font_get_glyph_list" qualifiers="virtual const">
+ <method name="_font_get_glyph_list" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Returns list of rendered glyphs in the cache entry.
</description>
</method>
- <method name="font_get_glyph_offset" qualifiers="virtual const">
+ <method name="_font_get_glyph_offset" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns glyph offset from the baseline.
</description>
</method>
- <method name="font_get_glyph_size" qualifiers="virtual const">
+ <method name="_font_get_glyph_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns size of the glyph.
</description>
</method>
- <method name="font_get_glyph_texture_idx" qualifiers="virtual const">
+ <method name="_font_get_glyph_texture_idx" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns index of the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_glyph_texture_rid" qualifiers="virtual const">
+ <method name="_font_get_glyph_texture_rid" qualifiers="virtual const">
<return type="RID" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns resource id of the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_glyph_texture_size" qualifiers="virtual const">
+ <method name="_font_get_glyph_texture_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns size of the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_glyph_uv_rect" qualifiers="virtual const">
+ <method name="_font_get_glyph_uv_rect" qualifiers="virtual const">
<return type="Rect2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_hinting" qualifiers="virtual const">
+ <method name="_font_get_hinting" qualifiers="virtual const">
<return type="int" enum="TextServer.Hinting" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the font hinting mode. Used by dynamic fonts only.
</description>
</method>
- <method name="font_get_kerning" qualifiers="virtual const">
+ <method name="_font_get_kerning" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph_pair" type="Vector2i" />
<description>
- Returns kerning for the pair of glyphs.
</description>
</method>
- <method name="font_get_kerning_list" qualifiers="virtual const">
+ <method name="_font_get_kerning_list" qualifiers="virtual const">
<return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns list of the kerning overrides.
</description>
</method>
- <method name="font_get_language_support_override" qualifiers="virtual">
+ <method name="_font_get_language_support_override" qualifiers="virtual">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [param language].
</description>
</method>
- <method name="font_get_language_support_overrides" qualifiers="virtual">
+ <method name="_font_get_language_support_overrides" qualifiers="virtual">
<return type="PackedStringArray" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns list of language support overrides.
</description>
</method>
- <method name="font_get_msdf_pixel_range" qualifiers="virtual const">
+ <method name="_font_get_msdf_pixel_range" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
- <method name="font_get_msdf_size" qualifiers="virtual const">
+ <method name="_font_get_msdf_size" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns source font size used to generate MSDF textures.
</description>
</method>
- <method name="font_get_name" qualifiers="virtual const">
+ <method name="_font_get_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font family name.
</description>
</method>
- <method name="font_get_opentype_feature_overrides" qualifiers="virtual const">
+ <method name="_font_get_opentype_feature_overrides" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font OpenType feature set override.
</description>
</method>
- <method name="font_get_oversampling" qualifiers="virtual const">
+ <method name="_font_get_oversampling" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
- <method name="font_get_scale" qualifiers="virtual const">
+ <method name="_font_get_scale" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns scaling factor of the color bitmap font.
</description>
</method>
- <method name="font_get_script_support_override" qualifiers="virtual">
+ <method name="_font_get_script_support_override" qualifiers="virtual">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [param script].
</description>
</method>
- <method name="font_get_script_support_overrides" qualifiers="virtual">
+ <method name="_font_get_script_support_overrides" qualifiers="virtual">
<return type="PackedStringArray" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns list of script support overrides.
</description>
</method>
- <method name="font_get_size_cache_list" qualifiers="virtual const">
+ <method name="_font_get_size_cache_list" qualifiers="virtual const">
<return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="font_get_style" qualifiers="virtual const">
+ <method name="_font_get_style" qualifiers="virtual const">
<return type="int" enum="TextServer.FontStyle" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font style flags, see [enum TextServer.FontStyle].
</description>
</method>
- <method name="font_get_style_name" qualifiers="virtual const">
+ <method name="_font_get_style_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font style name.
</description>
</method>
- <method name="font_get_subpixel_positioning" qualifiers="virtual const">
+ <method name="_font_get_subpixel_positioning" qualifiers="virtual const">
<return type="int" enum="TextServer.SubpixelPositioning" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font sub-pixel glyph positioning mode.
</description>
</method>
- <method name="font_get_supported_chars" qualifiers="virtual const">
+ <method name="_font_get_supported_chars" qualifiers="virtual const">
<return type="String" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="font_get_texture_count" qualifiers="virtual const">
+ <method name="_font_get_texture_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Returns number of textures used by font cache entry.
</description>
</method>
- <method name="font_get_texture_image" qualifiers="virtual const">
+ <method name="_font_get_texture_image" qualifiers="virtual const">
<return type="Image" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns font cache texture image data.
</description>
</method>
- <method name="font_get_texture_offsets" qualifiers="virtual const">
+ <method name="_font_get_texture_offsets" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
- <method name="font_get_transform" qualifiers="virtual const">
+ <method name="_font_get_transform" qualifiers="virtual const">
<return type="Transform2D" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns 2D transform applied to the font outlines.
</description>
</method>
- <method name="font_get_underline_position" qualifiers="virtual const">
+ <method name="_font_get_underline_position" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_get_underline_thickness" qualifiers="virtual const">
+ <method name="_font_get_underline_thickness" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns thickness of the underline in pixels.
</description>
</method>
- <method name="font_get_variation_coordinates" qualifiers="virtual const">
+ <method name="_font_get_variation_coordinates" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
- <method name="font_has_char" qualifiers="virtual const">
+ <method name="_font_has_char" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="char" type="int" />
<description>
- Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
- <method name="font_is_force_autohinter" qualifiers="virtual const">
+ <method name="_font_is_force_autohinter" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
- <method name="font_is_language_supported" qualifiers="virtual const">
+ <method name="_font_is_language_supported" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
- <method name="font_is_multichannel_signed_distance_field" qualifiers="virtual const">
+ <method name="_font_is_multichannel_signed_distance_field" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
</description>
</method>
- <method name="font_is_script_supported" qualifiers="virtual const">
+ <method name="_font_is_script_supported" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
- <method name="font_remove_glyph" qualifiers="virtual">
+ <method name="_font_remove_glyph" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Removes specified rendered glyph information from the cache entry.
</description>
</method>
- <method name="font_remove_kerning" qualifiers="virtual">
+ <method name="_font_remove_kerning" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph_pair" type="Vector2i" />
<description>
- Removes kerning override for the pair of glyphs.
</description>
</method>
- <method name="font_remove_language_support_override" qualifiers="virtual">
+ <method name="_font_remove_language_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Remove language support override.
</description>
</method>
- <method name="font_remove_script_support_override" qualifiers="virtual">
+ <method name="_font_remove_script_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Removes script support override.
</description>
</method>
- <method name="font_remove_size_cache" qualifiers="virtual">
+ <method name="_font_remove_size_cache" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Removes specified font size from the cache entry.
</description>
</method>
- <method name="font_remove_texture" qualifiers="virtual">
+ <method name="_font_remove_texture" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Removes specified texture from the cache entry.
</description>
</method>
- <method name="font_render_glyph" qualifiers="virtual">
+ <method name="_font_render_glyph" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="index" type="int" />
<description>
- Renders specified glyph to the font cache texture.
</description>
</method>
- <method name="font_render_range" qualifiers="virtual">
+ <method name="_font_render_range" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="start" type="int" />
<param index="3" name="end" type="int" />
<description>
- Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="font_set_antialiasing" qualifiers="virtual">
+ <method name="_font_set_antialiasing" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="antialiasing" type="int" enum="TextServer.FontAntialiasing" />
<description>
- Sets font anti-aliasing mode.
</description>
</method>
- <method name="font_set_ascent" qualifiers="virtual">
+ <method name="_font_set_ascent" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="ascent" type="float" />
<description>
- Sets the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_set_data" qualifiers="virtual">
+ <method name="_font_set_data" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="data" type="PackedByteArray" />
<description>
- Sets font source data, e.g contents of the dynamic font source file.
</description>
</method>
- <method name="font_set_data_ptr" qualifiers="virtual">
+ <method name="_font_set_data_ptr" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="data_ptr" type="const uint8_t*" />
<param index="2" name="data_size" type="int" />
<description>
- Sets font source data, e.g contents of the dynamic font source file. [param data_ptr] memory buffer must remain accessible during font lifetime.
</description>
</method>
- <method name="font_set_descent" qualifiers="virtual">
+ <method name="_font_set_descent" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="descent" type="float" />
<description>
- Sets the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_set_embolden" qualifiers="virtual">
+ <method name="_font_set_embolden" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="strength" type="float" />
<description>
- Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
- <method name="font_set_face_index" qualifiers="virtual">
+ <method name="_font_set_face_index" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="face_index" type="int" />
<description>
- Sets an active face index in the TrueType / OpenType collection.
</description>
</method>
- <method name="font_set_fixed_size" qualifiers="virtual">
+ <method name="_font_set_fixed_size" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="fixed_size" type="int" />
<description>
- Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
</description>
</method>
- <method name="font_set_force_autohinter" qualifiers="virtual">
+ <method name="_font_set_force_autohinter" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="force_autohinter" type="bool" />
<description>
- If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
- <method name="font_set_generate_mipmaps" qualifiers="virtual">
+ <method name="_font_set_generate_mipmaps" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="generate_mipmaps" type="bool" />
<description>
- If set to [code]true[/code] font texture mipmap generation is enabled.
</description>
</method>
- <method name="font_set_global_oversampling" qualifiers="virtual">
+ <method name="_font_set_global_oversampling" qualifiers="virtual">
<return type="void" />
<param index="0" name="oversampling" type="float" />
<description>
- Sets oversampling factor, shared by all font in the TextServer.
- [b]Note:[/b] This value can be automatically changed by display server.
</description>
</method>
- <method name="font_set_glyph_advance" qualifiers="virtual">
+ <method name="_font_set_glyph_advance" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph" type="int" />
<param index="3" name="advance" type="Vector2" />
<description>
- Sets glyph advance (offset of the next glyph).
</description>
</method>
- <method name="font_set_glyph_offset" qualifiers="virtual">
+ <method name="_font_set_glyph_offset" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="offset" type="Vector2" />
<description>
- Sets glyph offset from the baseline.
</description>
</method>
- <method name="font_set_glyph_size" qualifiers="virtual">
+ <method name="_font_set_glyph_size" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="gl_size" type="Vector2" />
<description>
- Sets size of the glyph.
</description>
</method>
- <method name="font_set_glyph_texture_idx" qualifiers="virtual">
+ <method name="_font_set_glyph_texture_idx" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="texture_idx" type="int" />
<description>
- Sets index of the cache texture containing the glyph.
</description>
</method>
- <method name="font_set_glyph_uv_rect" qualifiers="virtual">
+ <method name="_font_set_glyph_uv_rect" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="uv_rect" type="Rect2" />
<description>
- Sets rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="font_set_hinting" qualifiers="virtual">
+ <method name="_font_set_hinting" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="hinting" type="int" enum="TextServer.Hinting" />
<description>
- Sets font hinting mode. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_kerning" qualifiers="virtual">
+ <method name="_font_set_kerning" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph_pair" type="Vector2i" />
<param index="3" name="kerning" type="Vector2" />
<description>
- Sets kerning for the pair of glyphs.
</description>
</method>
- <method name="font_set_language_support_override" qualifiers="virtual">
+ <method name="_font_set_language_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<param index="2" name="supported" type="bool" />
<description>
- Adds override for [method font_is_language_supported].
</description>
</method>
- <method name="font_set_msdf_pixel_range" qualifiers="virtual">
+ <method name="_font_set_msdf_pixel_range" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="msdf_pixel_range" type="int" />
<description>
- Sets the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
- <method name="font_set_msdf_size" qualifiers="virtual">
+ <method name="_font_set_msdf_size" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="msdf_size" type="int" />
<description>
- Sets source font size used to generate MSDF textures.
</description>
</method>
- <method name="font_set_multichannel_signed_distance_field" qualifiers="virtual">
+ <method name="_font_set_multichannel_signed_distance_field" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="msdf" type="bool" />
<description>
- If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
- [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
</description>
</method>
- <method name="font_set_name" qualifiers="virtual">
+ <method name="_font_set_name" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="name" type="String" />
<description>
- Sets the font family name.
</description>
</method>
- <method name="font_set_opentype_feature_overrides" qualifiers="virtual">
+ <method name="_font_set_opentype_feature_overrides" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="overrides" type="Dictionary" />
<description>
- Sets font OpenType feature set override.
</description>
</method>
- <method name="font_set_oversampling" qualifiers="virtual">
+ <method name="_font_set_oversampling" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="oversampling" type="float" />
<description>
- Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_scale" qualifiers="virtual">
+ <method name="_font_set_scale" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="scale" type="float" />
<description>
- Sets scaling factor of the color bitmap font.
</description>
</method>
- <method name="font_set_script_support_override" qualifiers="virtual">
+ <method name="_font_set_script_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<param index="2" name="supported" type="bool" />
<description>
- Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_style" qualifiers="virtual">
+ <method name="_font_set_style" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="style" type="int" enum="TextServer.FontStyle" />
<description>
- Sets the font style flags, see [enum TextServer.FontStyle].
</description>
</method>
- <method name="font_set_style_name" qualifiers="virtual">
+ <method name="_font_set_style_name" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="name_style" type="String" />
<description>
- Sets the font style name.
</description>
</method>
- <method name="font_set_subpixel_positioning" qualifiers="virtual">
+ <method name="_font_set_subpixel_positioning" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
<description>
- Sets font sub-pixel glyph positioning mode.
</description>
</method>
- <method name="font_set_texture_image" qualifiers="virtual">
+ <method name="_font_set_texture_image" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<param index="3" name="image" type="Image" />
<description>
- Sets font cache texture image data.
</description>
</method>
- <method name="font_set_texture_offsets" qualifiers="virtual">
+ <method name="_font_set_texture_offsets" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<param index="3" name="offset" type="PackedInt32Array" />
<description>
- Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
- <method name="font_set_transform" qualifiers="virtual">
+ <method name="_font_set_transform" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="transform" type="Transform2D" />
<description>
- Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
- For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
</description>
</method>
- <method name="font_set_underline_position" qualifiers="virtual">
+ <method name="_font_set_underline_position" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="underline_position" type="float" />
<description>
- Sets pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_set_underline_thickness" qualifiers="virtual">
+ <method name="_font_set_underline_thickness" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="underline_thickness" type="float" />
<description>
- Sets thickness of the underline in pixels.
</description>
</method>
- <method name="font_set_variation_coordinates" qualifiers="virtual">
+ <method name="_font_set_variation_coordinates" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
- <method name="font_supported_feature_list" qualifiers="virtual const">
+ <method name="_font_supported_feature_list" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the dictionary of the supported OpenType features.
</description>
</method>
- <method name="font_supported_variation_list" qualifiers="virtual const">
+ <method name="_font_supported_variation_list" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the dictionary of the supported OpenType variation coordinates.
</description>
</method>
- <method name="format_number" qualifiers="virtual const">
+ <method name="_format_number" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language].
</description>
</method>
- <method name="free_rid" qualifiers="virtual">
+ <method name="_free_rid" qualifiers="virtual">
<return type="void" />
<param index="0" name="rid" type="RID" />
<description>
- Frees an object created by this [TextServer].
</description>
</method>
- <method name="get_features" qualifiers="virtual const">
+ <method name="_get_features" qualifiers="virtual const">
<return type="int" />
<description>
- Returns text server features, see [enum TextServer.Feature].
</description>
</method>
- <method name="get_hex_code_box_size" qualifiers="virtual const">
+ <method name="_get_hex_code_box_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="size" type="int" />
<param index="1" name="index" type="int" />
<description>
- Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="get_name" qualifiers="virtual const">
+ <method name="_get_name" qualifiers="virtual const">
<return type="String" />
<description>
- Returns the name of the server interface.
</description>
</method>
- <method name="get_support_data_filename" qualifiers="virtual const">
+ <method name="_get_support_data_filename" qualifiers="virtual const">
<return type="String" />
<description>
- Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
</description>
</method>
- <method name="get_support_data_info" qualifiers="virtual const">
+ <method name="_get_support_data_info" qualifiers="virtual const">
<return type="String" />
<description>
- Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
</description>
</method>
- <method name="has" qualifiers="virtual">
+ <method name="_has" qualifiers="virtual">
<return type="bool" />
<param index="0" name="rid" type="RID" />
<description>
- Returns [code]true[/code] if [param rid] is valid resource owned by this text server.
</description>
</method>
- <method name="has_feature" qualifiers="virtual const">
+ <method name="_has_feature" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="feature" type="int" enum="TextServer.Feature" />
<description>
- Returns [code]true[/code] if the server supports a feature.
</description>
</method>
- <method name="is_confusable" qualifiers="virtual const">
+ <method name="_is_confusable" qualifiers="virtual const">
<return type="int" />
<param index="0" name="string" type="String" />
<param index="1" name="dict" type="PackedStringArray" />
<description>
- Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found.
</description>
</method>
- <method name="is_locale_right_to_left" qualifiers="virtual const">
+ <method name="_is_locale_right_to_left" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="locale" type="String" />
<description>
- Returns [code]true[/code] if locale is right-to-left.
</description>
</method>
- <method name="is_valid_identifier" qualifiers="virtual const">
+ <method name="_is_valid_identifier" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="string" type="String" />
<description>
- Returns [code]true[/code] is [param string] is a valid identifier.
</description>
</method>
- <method name="load_support_data" qualifiers="virtual">
+ <method name="_load_support_data" qualifiers="virtual">
<return type="bool" />
<param index="0" name="filename" type="String" />
<description>
- Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
</description>
</method>
- <method name="name_to_tag" qualifiers="virtual const">
+ <method name="_name_to_tag" qualifiers="virtual const">
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Converts readable feature, variation, script or language name to OpenType tag.
</description>
</method>
- <method name="parse_number" qualifiers="virtual const">
+ <method name="_parse_number" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Converts a number from the numeral systems used in [param language] to Western Arabic (0..9).
</description>
</method>
- <method name="parse_structured_text" qualifiers="virtual const">
+ <method name="_parse_structured_text" qualifiers="virtual const">
<return type="Vector2i[]" />
<param index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
<param index="1" name="args" type="Array" />
@@ -986,37 +859,32 @@
<description>
</description>
</method>
- <method name="percent_sign" qualifiers="virtual const">
+ <method name="_percent_sign" qualifiers="virtual const">
<return type="String" />
<param index="0" name="language" type="String" />
<description>
- Returns percent sign used in the [param language].
</description>
</method>
- <method name="save_support_data" qualifiers="virtual const">
+ <method name="_save_support_data" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="filename" type="String" />
<description>
- Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
- [b]Note:[/b] This function is used by during project export, to include TextServer database.
</description>
</method>
- <method name="shaped_get_span_count" qualifiers="virtual const">
+ <method name="_shaped_get_span_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
</description>
</method>
- <method name="shaped_get_span_meta" qualifiers="virtual const">
+ <method name="_shaped_get_span_meta" qualifiers="virtual const">
<return type="Variant" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="index" type="int" />
<description>
- Returns text span metadata.
</description>
</method>
- <method name="shaped_set_span_update_font" qualifiers="virtual">
+ <method name="_shaped_set_span_update_font" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="index" type="int" />
@@ -1024,10 +892,9 @@
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" />
<description>
- Changes text span font, font size and OpenType features, without changing the text.
</description>
</method>
- <method name="shaped_text_add_object" qualifiers="virtual">
+ <method name="_shaped_text_add_object" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="key" type="Variant" />
@@ -1035,10 +902,9 @@
<param index="3" name="inline_align" type="int" enum="InlineAlignment" />
<param index="4" name="length" type="int" />
<description>
- Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
</description>
</method>
- <method name="shaped_text_add_string" qualifiers="virtual">
+ <method name="_shaped_text_add_string" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="text" type="String" />
@@ -1048,17 +914,15 @@
<param index="5" name="language" type="String" />
<param index="6" name="meta" type="Variant" />
<description>
- Adds text span and font to draw it to the text buffer.
</description>
</method>
- <method name="shaped_text_clear" qualifiers="virtual">
+ <method name="_shaped_text_clear" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<description>
- Clears text buffer (removes text and inline objects).
</description>
</method>
- <method name="shaped_text_draw" qualifiers="virtual const">
+ <method name="_shaped_text_draw" qualifiers="virtual const">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -1067,11 +931,9 @@
<param index="4" name="clip_r" type="float" />
<param index="5" name="color" type="Color" />
<description>
- Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_draw_outline" qualifiers="virtual const">
+ <method name="_shaped_text_draw_outline" qualifiers="virtual const">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -1081,130 +943,109 @@
<param index="5" name="outline_size" type="int" />
<param index="6" name="color" type="Color" />
<description>
- Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_fit_to_width" qualifiers="virtual">
+ <method name="_shaped_text_fit_to_width" qualifiers="virtual">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="float" />
<param index="2" name="jst_flags" type="int" enum="TextServer.JustificationFlag" />
<description>
- Adjusts text with to fit to specified width, returns new text width.
</description>
</method>
- <method name="shaped_text_get_ascent" qualifiers="virtual const">
+ <method name="_shaped_text_get_ascent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
</description>
</method>
- <method name="shaped_text_get_carets" qualifiers="virtual const">
+ <method name="_shaped_text_get_carets" qualifiers="virtual const">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="position" type="int" />
<param index="2" name="caret" type="CaretInfo*" />
<description>
- Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_custom_punctuation" qualifiers="virtual const">
+ <method name="_shaped_text_get_custom_punctuation" qualifiers="virtual const">
<return type="String" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
- <method name="shaped_text_get_descent" qualifiers="virtual const">
+ <method name="_shaped_text_get_descent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
</description>
</method>
- <method name="shaped_text_get_direction" qualifiers="virtual const">
+ <method name="_shaped_text_get_direction" qualifiers="virtual const">
<return type="int" enum="TextServer.Direction" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns direction of the text.
</description>
</method>
- <method name="shaped_text_get_dominant_direction_in_range" qualifiers="virtual const">
+ <method name="_shaped_text_get_dominant_direction_in_range" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="start" type="int" />
<param index="2" name="end" type="int" />
<description>
- Returns dominant direction of in the range of text.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_ellipsis_glyph_count" qualifiers="virtual const">
+ <method name="_shaped_text_get_ellipsis_glyph_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns number of glyphs in the ellipsis.
</description>
</method>
- <method name="shaped_text_get_ellipsis_glyphs" qualifiers="virtual const">
+ <method name="_shaped_text_get_ellipsis_glyphs" qualifiers="virtual const">
<return type="const Glyph*" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns array of the glyphs in the ellipsis.
</description>
</method>
- <method name="shaped_text_get_ellipsis_pos" qualifiers="virtual const">
+ <method name="_shaped_text_get_ellipsis_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns position of the ellipsis.
</description>
</method>
- <method name="shaped_text_get_glyph_count" qualifiers="virtual const">
+ <method name="_shaped_text_get_glyph_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns number of glyphs in the buffer.
</description>
</method>
- <method name="shaped_text_get_glyphs" qualifiers="virtual const">
+ <method name="_shaped_text_get_glyphs" qualifiers="virtual const">
<return type="const Glyph*" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns an array of glyphs in the visual order.
</description>
</method>
- <method name="shaped_text_get_grapheme_bounds" qualifiers="virtual const">
+ <method name="_shaped_text_get_grapheme_bounds" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character's bounds as offsets from the start of the line.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_inferred_direction" qualifiers="virtual const">
+ <method name="_shaped_text_get_inferred_direction" qualifiers="virtual const">
<return type="int" enum="TextServer.Direction" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns direction of the text, inferred by the BiDi algorithm.
</description>
</method>
- <method name="shaped_text_get_line_breaks" qualifiers="virtual const">
+ <method name="_shaped_text_get_line_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="float" />
<param index="2" name="start" type="int" />
<param index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" />
<description>
- Breaks text to the lines and returns character ranges for each line.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_line_breaks_adv" qualifiers="virtual const">
+ <method name="_shaped_text_get_line_breaks_adv" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="PackedFloat32Array" />
@@ -1212,334 +1053,280 @@
<param index="3" name="once" type="bool" />
<param index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" />
<description>
- Breaks text to the lines and columns. Returns character ranges for each segment.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_object_rect" qualifiers="virtual const">
+ <method name="_shaped_text_get_object_rect" qualifiers="virtual const">
<return type="Rect2" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="key" type="Variant" />
<description>
- Returns bounding rectangle of the inline object.
</description>
</method>
- <method name="shaped_text_get_objects" qualifiers="virtual const">
+ <method name="_shaped_text_get_objects" qualifiers="virtual const">
<return type="Array" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns array of inline objects.
</description>
</method>
- <method name="shaped_text_get_orientation" qualifiers="virtual const">
+ <method name="_shaped_text_get_orientation" qualifiers="virtual const">
<return type="int" enum="TextServer.Orientation" />
<param index="0" name="shaped" type="RID" />
<description>
- eturns text orientation.
</description>
</method>
- <method name="shaped_text_get_parent" qualifiers="virtual const">
+ <method name="_shaped_text_get_parent" qualifiers="virtual const">
<return type="RID" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the parent buffer from which the substring originates.
</description>
</method>
- <method name="shaped_text_get_preserve_control" qualifiers="virtual const">
+ <method name="_shaped_text_get_preserve_control" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns [code]true[/code] if text buffer is configured to display control characters.
</description>
</method>
- <method name="shaped_text_get_preserve_invalid" qualifiers="virtual const">
+ <method name="_shaped_text_get_preserve_invalid" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
- [b]Note:[/b] If set to [code]false[/code], nothing is displayed in place of invalid characters.
</description>
</method>
- <method name="shaped_text_get_range" qualifiers="virtual const">
+ <method name="_shaped_text_get_range" qualifiers="virtual const">
<return type="Vector2i" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns substring buffer character range in the parent buffer.
</description>
</method>
- <method name="shaped_text_get_selection" qualifiers="virtual const">
+ <method name="_shaped_text_get_selection" qualifiers="virtual const">
<return type="PackedVector2Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="start" type="int" />
<param index="2" name="end" type="int" />
<description>
- Returns selection rectangles for the specified character range.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_size" qualifiers="virtual const">
+ <method name="_shaped_text_get_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns size of the text.
</description>
</method>
- <method name="shaped_text_get_spacing" qualifiers="virtual const">
+ <method name="_shaped_text_get_spacing" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Returns extra spacing added between glyphs or lines in pixels.
</description>
</method>
- <method name="shaped_text_get_trim_pos" qualifiers="virtual const">
+ <method name="_shaped_text_get_trim_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the position of the overrun trim.
</description>
</method>
- <method name="shaped_text_get_underline_position" qualifiers="virtual const">
+ <method name="_shaped_text_get_underline_position" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="shaped_text_get_underline_thickness" qualifiers="virtual const">
+ <method name="_shaped_text_get_underline_thickness" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns thickness of the underline.
</description>
</method>
- <method name="shaped_text_get_width" qualifiers="virtual const">
+ <method name="_shaped_text_get_width" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns width (for horizontal layout) or height (for vertical) of the text.
</description>
</method>
- <method name="shaped_text_get_word_breaks" qualifiers="virtual const">
+ <method name="_shaped_text_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" />
<description>
- Breaks text into words and returns array of character ranges.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_hit_test_grapheme" qualifiers="virtual const">
+ <method name="_shaped_text_hit_test_grapheme" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="coord" type="float" />
<description>
- Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_hit_test_position" qualifiers="virtual const">
+ <method name="_shaped_text_hit_test_position" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="coord" type="float" />
<description>
- Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_is_ready" qualifiers="virtual const">
+ <method name="_shaped_text_is_ready" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns [code]true[/code] if buffer is successfully shaped.
</description>
</method>
- <method name="shaped_text_next_grapheme_pos" qualifiers="virtual const">
+ <method name="_shaped_text_next_grapheme_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character end position closest to the [param pos].
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_overrun_trim_to_width" qualifiers="virtual">
+ <method name="_shaped_text_overrun_trim_to_width" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="float" />
<param index="2" name="trim_flags" type="int" enum="TextServer.TextOverrunFlag" />
<description>
- Trims text if it exceeds the given width.
</description>
</method>
- <method name="shaped_text_prev_grapheme_pos" qualifiers="virtual const">
+ <method name="_shaped_text_prev_grapheme_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character start position closest to the [param pos].
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_resize_object" qualifiers="virtual">
+ <method name="_shaped_text_resize_object" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="key" type="Variant" />
<param index="2" name="size" type="Vector2" />
<param index="3" name="inline_align" type="int" enum="InlineAlignment" />
<description>
- Sets new size and alignment of embedded object.
</description>
</method>
- <method name="shaped_text_set_bidi_override" qualifiers="virtual">
+ <method name="_shaped_text_set_bidi_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="override" type="Array" />
<description>
- Overrides BiDi for the structured text.
- Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
- <method name="shaped_text_set_custom_punctuation" qualifiers="virtual">
+ <method name="_shaped_text_set_custom_punctuation" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="punct" type="String" />
<description>
- Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
- <method name="shaped_text_set_direction" qualifiers="virtual">
+ <method name="_shaped_text_set_direction" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="direction" type="int" enum="TextServer.Direction" />
<description>
- Sets desired text [param direction]. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
</description>
</method>
- <method name="shaped_text_set_orientation" qualifiers="virtual">
+ <method name="_shaped_text_set_orientation" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="orientation" type="int" enum="TextServer.Orientation" />
<description>
- Sets desired text orientation.
</description>
</method>
- <method name="shaped_text_set_preserve_control" qualifiers="virtual">
+ <method name="_shaped_text_set_preserve_control" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="enabled" type="bool" />
<description>
- If set to [code]true[/code] text buffer will display control characters.
</description>
</method>
- <method name="shaped_text_set_preserve_invalid" qualifiers="virtual">
+ <method name="_shaped_text_set_preserve_invalid" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="enabled" type="bool" />
<description>
- If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
</description>
</method>
- <method name="shaped_text_set_spacing" qualifiers="virtual">
+ <method name="_shaped_text_set_spacing" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
<param index="2" name="value" type="int" />
<description>
- Sets extra spacing added between glyphs or lines in pixels.
</description>
</method>
- <method name="shaped_text_shape" qualifiers="virtual">
+ <method name="_shaped_text_shape" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
</description>
</method>
- <method name="shaped_text_sort_logical" qualifiers="virtual">
+ <method name="_shaped_text_sort_logical" qualifiers="virtual">
<return type="const Glyph*" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns text glyphs in the logical order.
</description>
</method>
- <method name="shaped_text_substr" qualifiers="virtual const">
+ <method name="_shaped_text_substr" qualifiers="virtual const">
<return type="RID" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="start" type="int" />
<param index="2" name="length" type="int" />
<description>
- Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).
</description>
</method>
- <method name="shaped_text_tab_align" qualifiers="virtual">
+ <method name="_shaped_text_tab_align" qualifiers="virtual">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="tab_stops" type="PackedFloat32Array" />
<description>
- Aligns shaped text to the given tab-stops.
</description>
</method>
- <method name="shaped_text_update_breaks" qualifiers="virtual">
+ <method name="_shaped_text_update_breaks" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Updates line breaking positions in the text buffer.
- [b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
</description>
</method>
- <method name="shaped_text_update_justification_ops" qualifiers="virtual">
+ <method name="_shaped_text_update_justification_ops" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Updates line justification positions (word breaks and elongations) in the text buffer.
- [b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
</description>
</method>
- <method name="spoof_check" qualifiers="virtual const">
+ <method name="_spoof_check" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="string" type="String" />
<description>
- Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader.
</description>
</method>
- <method name="string_get_word_breaks" qualifiers="virtual const">
+ <method name="_string_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Returns array of the word break character offsets.
</description>
</method>
- <method name="string_to_lower" qualifiers="virtual const">
+ <method name="_string_to_lower" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Returns the string converted to lowercase.
</description>
</method>
- <method name="string_to_upper" qualifiers="virtual const">
+ <method name="_string_to_upper" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Returns the string converted to uppercase.
</description>
</method>
- <method name="strip_diacritics" qualifiers="virtual const">
+ <method name="_strip_diacritics" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<description>
- Strips diacritics from the string.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="tag_to_name" qualifiers="virtual const">
+ <method name="_tag_to_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="tag" type="int" />
<description>
- Converts OpenType tag to readable feature, variation, script or language name.
</description>
</method>
</methods>
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 3565254ac7..738c90702b 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -33,7 +33,7 @@
#ifdef GDEXTENSION
// Headers for building as GDExtension plug-in.
-#include <godot_cpp/classes/file.hpp>
+#include <godot_cpp/classes/file_access.hpp>
#include <godot_cpp/classes/project_settings.hpp>
#include <godot_cpp/classes/rendering_server.hpp>
#include <godot_cpp/classes/translation_server.hpp>
@@ -327,7 +327,7 @@ _FORCE_INLINE_ bool is_connected_to_prev(char32_t p_chr, char32_t p_pchr) {
/*************************************************************************/
-bool TextServerAdvanced::has_feature(Feature p_feature) const {
+bool TextServerAdvanced::_has_feature(Feature p_feature) const {
switch (p_feature) {
case FEATURE_SIMPLE_LAYOUT:
case FEATURE_BIDI_LAYOUT:
@@ -354,7 +354,7 @@ bool TextServerAdvanced::has_feature(Feature p_feature) const {
return false;
}
-String TextServerAdvanced::get_name() const {
+String TextServerAdvanced::_get_name() const {
#ifdef GDEXTENSION
return "ICU / HarfBuzz / Graphite (GDExtension)";
#else
@@ -362,7 +362,7 @@ String TextServerAdvanced::get_name() const {
#endif
}
-int64_t TextServerAdvanced::get_features() const {
+int64_t TextServerAdvanced::_get_features() const {
int64_t interface_features = FEATURE_SIMPLE_LAYOUT | FEATURE_BIDI_LAYOUT | FEATURE_VERTICAL_LAYOUT | FEATURE_SHAPING | FEATURE_KASHIDA_JUSTIFICATION | FEATURE_BREAK_ITERATORS | FEATURE_FONT_BITMAP | FEATURE_FONT_VARIABLE | FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION | FEATURE_USE_SUPPORT_DATA;
#ifdef MODULE_FREETYPE_ENABLED
interface_features |= FEATURE_FONT_DYNAMIC;
@@ -374,7 +374,7 @@ int64_t TextServerAdvanced::get_features() const {
return interface_features;
}
-void TextServerAdvanced::free_rid(const RID &p_rid) {
+void TextServerAdvanced::_free_rid(const RID &p_rid) {
_THREAD_SAFE_METHOD_
if (font_owner.owns(p_rid)) {
FontAdvanced *fd = font_owner.get_or_null(p_rid);
@@ -387,12 +387,12 @@ void TextServerAdvanced::free_rid(const RID &p_rid) {
}
}
-bool TextServerAdvanced::has(const RID &p_rid) {
+bool TextServerAdvanced::_has(const RID &p_rid) {
_THREAD_SAFE_METHOD_
return font_owner.owns(p_rid) || shaped_owner.owns(p_rid);
}
-bool TextServerAdvanced::load_support_data(const String &p_filename) {
+bool TextServerAdvanced::_load_support_data(const String &p_filename) {
_THREAD_SAFE_METHOD_
#ifdef ICU_STATIC_DATA
@@ -410,7 +410,11 @@ bool TextServerAdvanced::load_support_data(const String &p_filename) {
return false;
}
uint64_t len = f->get_length();
+#ifdef GDEXTENSION
+ PackedByteArray icu_data = f->get_buffer(len);
+#else
PackedByteArray icu_data = f->_get_buffer(len);
+#endif
UErrorCode err = U_ZERO_ERROR;
udata_setCommonData(icu_data.ptr(), &err);
@@ -429,7 +433,7 @@ bool TextServerAdvanced::load_support_data(const String &p_filename) {
return true;
}
-String TextServerAdvanced::get_support_data_filename() const {
+String TextServerAdvanced::_get_support_data_filename() const {
#ifdef ICU_STATIC_DATA
return _MKSTR(ICU_DATA_NAME);
#else
@@ -437,7 +441,7 @@ String TextServerAdvanced::get_support_data_filename() const {
#endif
}
-String TextServerAdvanced::get_support_data_info() const {
+String TextServerAdvanced::_get_support_data_info() const {
#ifdef ICU_STATIC_DATA
return String("ICU break iteration data (") + _MKSTR(ICU_DATA_NAME) + String(").");
#else
@@ -445,7 +449,7 @@ String TextServerAdvanced::get_support_data_info() const {
#endif
}
-bool TextServerAdvanced::save_support_data(const String &p_filename) const {
+bool TextServerAdvanced::_save_support_data(const String &p_filename) const {
_THREAD_SAFE_METHOD_
#ifdef ICU_STATIC_DATA
@@ -459,7 +463,11 @@ bool TextServerAdvanced::save_support_data(const String &p_filename) const {
PackedByteArray icu_data;
icu_data.resize(U_ICUDATA_SIZE);
memcpy(icu_data.ptrw(), U_ICUDATA_ENTRY_POINT, U_ICUDATA_SIZE);
+#ifdef GDEXTENSION
+ f->store_buffer(icu_data);
+#else
f->_store_buffer(icu_data);
+#endif
return true;
#else
@@ -467,7 +475,7 @@ bool TextServerAdvanced::save_support_data(const String &p_filename) const {
#endif
}
-bool TextServerAdvanced::is_locale_right_to_left(const String &p_locale) const {
+bool TextServerAdvanced::_is_locale_right_to_left(const String &p_locale) const {
String l = p_locale.get_slicec('_', 0);
if ((l == "ar") || (l == "dv") || (l == "he") || (l == "fa") || (l == "ff") || (l == "ku") || (l == "ur")) {
return true;
@@ -739,7 +747,7 @@ void TextServerAdvanced::_insert_feature_sets() {
_insert_feature("weight", HB_TAG('w', 'g', 'h', 't'), Variant::Type::INT, false);
}
-int64_t TextServerAdvanced::name_to_tag(const String &p_name) const {
+int64_t TextServerAdvanced::_name_to_tag(const String &p_name) const {
if (feature_sets.has(p_name)) {
return feature_sets[p_name];
}
@@ -762,7 +770,7 @@ bool TextServerAdvanced::_get_tag_hidden(int64_t p_tag) const {
return false;
}
-String TextServerAdvanced::tag_to_name(int64_t p_tag) const {
+String TextServerAdvanced::_tag_to_name(int64_t p_tag) const {
if (feature_sets_inv.has(p_tag)) {
return feature_sets_inv[p_tag].name;
}
@@ -1043,8 +1051,14 @@ _FORCE_INLINE_ TextServerAdvanced::FontGlyph TextServerAdvanced::rasterize_msdf(
td.projection = &projection;
td.distancePixelConversion = &distancePixelConversion;
+#ifdef GDEXTENSION
+ for (int i = 0; i < h; i++) {
+ _generateMTSDF_threaded(i, &td);
+ }
+#else
WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &TextServerAdvanced::_generateMTSDF_threaded, &td, h, -1, true, SNAME("FontServerRasterizeMSDF"));
WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_task);
+#endif
msdfgen::msdfErrorCorrection(image, shape, projection, p_pixel_range, config);
@@ -1415,7 +1429,7 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
fd->oversampling = 1.0;
fd->size.x = p_font_data->msdf_source_size;
} else if (p_font_data->oversampling <= 0.0) {
- fd->oversampling = font_get_global_oversampling();
+ fd->oversampling = _font_get_global_oversampling();
} else {
fd->oversampling = p_font_data->oversampling;
}
@@ -1808,8 +1822,8 @@ _FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontAdvanced *p_f
coords.write[i] = CLAMP(var.value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum);
}
- if (p_font_data->variation_coordinates.has(tag_to_name(var.tag))) {
- var.value = p_font_data->variation_coordinates[tag_to_name(var.tag)];
+ if (p_font_data->variation_coordinates.has(_tag_to_name(var.tag))) {
+ var.value = p_font_data->variation_coordinates[_tag_to_name(var.tag)];
coords.write[i] = CLAMP(var.value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum);
}
@@ -1854,7 +1868,7 @@ hb_font_t *TextServerAdvanced::_font_get_hb_handle(const RID &p_font_rid, int64_
return fd->cache[size]->hb_handle;
}
-RID TextServerAdvanced::create_font() {
+RID TextServerAdvanced::_create_font() {
_THREAD_SAFE_METHOD_
FontAdvanced *fd = memnew(FontAdvanced);
@@ -1862,7 +1876,7 @@ RID TextServerAdvanced::create_font() {
return font_owner.make_rid(fd);
}
-void TextServerAdvanced::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
+void TextServerAdvanced::_font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1873,7 +1887,7 @@ void TextServerAdvanced::font_set_data(const RID &p_font_rid, const PackedByteAr
fd->data_size = fd->data.size();
}
-void TextServerAdvanced::font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {
+void TextServerAdvanced::_font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1884,7 +1898,7 @@ void TextServerAdvanced::font_set_data_ptr(const RID &p_font_rid, const uint8_t
fd->data_size = p_data_size;
}
-void TextServerAdvanced::font_set_face_index(const RID &p_font_rid, int64_t p_face_index) {
+void TextServerAdvanced::_font_set_face_index(const RID &p_font_rid, int64_t p_face_index) {
ERR_FAIL_COND(p_face_index < 0);
ERR_FAIL_COND(p_face_index >= 0x7FFF);
@@ -1898,7 +1912,7 @@ void TextServerAdvanced::font_set_face_index(const RID &p_font_rid, int64_t p_fa
}
}
-int64_t TextServerAdvanced::font_get_face_index(const RID &p_font_rid) const {
+int64_t TextServerAdvanced::_font_get_face_index(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1906,7 +1920,7 @@ int64_t TextServerAdvanced::font_get_face_index(const RID &p_font_rid) const {
return fd->face_index;
}
-int64_t TextServerAdvanced::font_get_face_count(const RID &p_font_rid) const {
+int64_t TextServerAdvanced::_font_get_face_count(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1947,7 +1961,7 @@ int64_t TextServerAdvanced::font_get_face_count(const RID &p_font_rid) const {
return face_count;
}
-void TextServerAdvanced::font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) {
+void TextServerAdvanced::_font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1957,7 +1971,7 @@ void TextServerAdvanced::font_set_style(const RID &p_font_rid, BitField<FontStyl
fd->style_flags = p_style;
}
-BitField<TextServer::FontStyle> TextServerAdvanced::font_get_style(const RID &p_font_rid) const {
+BitField<TextServer::FontStyle> TextServerAdvanced::_font_get_style(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1967,7 +1981,7 @@ BitField<TextServer::FontStyle> TextServerAdvanced::font_get_style(const RID &p_
return fd->style_flags;
}
-void TextServerAdvanced::font_set_style_name(const RID &p_font_rid, const String &p_name) {
+void TextServerAdvanced::_font_set_style_name(const RID &p_font_rid, const String &p_name) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1977,7 +1991,7 @@ void TextServerAdvanced::font_set_style_name(const RID &p_font_rid, const String
fd->style_name = p_name;
}
-String TextServerAdvanced::font_get_style_name(const RID &p_font_rid) const {
+String TextServerAdvanced::_font_get_style_name(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
@@ -1987,7 +2001,7 @@ String TextServerAdvanced::font_get_style_name(const RID &p_font_rid) const {
return fd->style_name;
}
-void TextServerAdvanced::font_set_name(const RID &p_font_rid, const String &p_name) {
+void TextServerAdvanced::_font_set_name(const RID &p_font_rid, const String &p_name) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1997,7 +2011,7 @@ void TextServerAdvanced::font_set_name(const RID &p_font_rid, const String &p_na
fd->font_name = p_name;
}
-String TextServerAdvanced::font_get_name(const RID &p_font_rid) const {
+String TextServerAdvanced::_font_get_name(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
@@ -2007,7 +2021,7 @@ String TextServerAdvanced::font_get_name(const RID &p_font_rid) const {
return fd->font_name;
}
-void TextServerAdvanced::font_set_antialiasing(RID p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
+void TextServerAdvanced::_font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2018,7 +2032,7 @@ void TextServerAdvanced::font_set_antialiasing(RID p_font_rid, TextServer::FontA
}
}
-TextServer::FontAntialiasing TextServerAdvanced::font_get_antialiasing(RID p_font_rid) const {
+TextServer::FontAntialiasing TextServerAdvanced::_font_get_antialiasing(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, TextServer::FONT_ANTIALIASING_NONE);
@@ -2026,7 +2040,7 @@ TextServer::FontAntialiasing TextServerAdvanced::font_get_antialiasing(RID p_fon
return fd->antialiasing;
}
-void TextServerAdvanced::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
+void TextServerAdvanced::_font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2041,7 +2055,7 @@ void TextServerAdvanced::font_set_generate_mipmaps(const RID &p_font_rid, bool p
}
}
-bool TextServerAdvanced::font_get_generate_mipmaps(const RID &p_font_rid) const {
+bool TextServerAdvanced::_font_get_generate_mipmaps(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2049,7 +2063,7 @@ bool TextServerAdvanced::font_get_generate_mipmaps(const RID &p_font_rid) const
return fd->mipmaps;
}
-void TextServerAdvanced::font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {
+void TextServerAdvanced::_font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2060,7 +2074,7 @@ void TextServerAdvanced::font_set_multichannel_signed_distance_field(const RID &
}
}
-bool TextServerAdvanced::font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {
+bool TextServerAdvanced::_font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2068,7 +2082,7 @@ bool TextServerAdvanced::font_is_multichannel_signed_distance_field(const RID &p
return fd->msdf;
}
-void TextServerAdvanced::font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {
+void TextServerAdvanced::_font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2079,7 +2093,7 @@ void TextServerAdvanced::font_set_msdf_pixel_range(const RID &p_font_rid, int64_
}
}
-int64_t TextServerAdvanced::font_get_msdf_pixel_range(const RID &p_font_rid) const {
+int64_t TextServerAdvanced::_font_get_msdf_pixel_range(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2087,7 +2101,7 @@ int64_t TextServerAdvanced::font_get_msdf_pixel_range(const RID &p_font_rid) con
return fd->msdf_range;
}
-void TextServerAdvanced::font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {
+void TextServerAdvanced::_font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2098,7 +2112,7 @@ void TextServerAdvanced::font_set_msdf_size(const RID &p_font_rid, int64_t p_msd
}
}
-int64_t TextServerAdvanced::font_get_msdf_size(const RID &p_font_rid) const {
+int64_t TextServerAdvanced::_font_get_msdf_size(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2106,7 +2120,7 @@ int64_t TextServerAdvanced::font_get_msdf_size(const RID &p_font_rid) const {
return fd->msdf_source_size;
}
-void TextServerAdvanced::font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {
+void TextServerAdvanced::_font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2114,7 +2128,7 @@ void TextServerAdvanced::font_set_fixed_size(const RID &p_font_rid, int64_t p_fi
fd->fixed_size = p_fixed_size;
}
-int64_t TextServerAdvanced::font_get_fixed_size(const RID &p_font_rid) const {
+int64_t TextServerAdvanced::_font_get_fixed_size(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2122,7 +2136,7 @@ int64_t TextServerAdvanced::font_get_fixed_size(const RID &p_font_rid) const {
return fd->fixed_size;
}
-void TextServerAdvanced::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
+void TextServerAdvanced::_font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2133,7 +2147,7 @@ void TextServerAdvanced::font_set_force_autohinter(const RID &p_font_rid, bool p
}
}
-bool TextServerAdvanced::font_is_force_autohinter(const RID &p_font_rid) const {
+bool TextServerAdvanced::_font_is_force_autohinter(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2141,7 +2155,7 @@ bool TextServerAdvanced::font_is_force_autohinter(const RID &p_font_rid) const {
return fd->force_autohinter;
}
-void TextServerAdvanced::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
+void TextServerAdvanced::_font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2152,7 +2166,7 @@ void TextServerAdvanced::font_set_hinting(const RID &p_font_rid, TextServer::Hin
}
}
-TextServer::Hinting TextServerAdvanced::font_get_hinting(const RID &p_font_rid) const {
+TextServer::Hinting TextServerAdvanced::_font_get_hinting(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, HINTING_NONE);
@@ -2160,7 +2174,7 @@ TextServer::Hinting TextServerAdvanced::font_get_hinting(const RID &p_font_rid)
return fd->hinting;
}
-void TextServerAdvanced::font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {
+void TextServerAdvanced::_font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2168,7 +2182,7 @@ void TextServerAdvanced::font_set_subpixel_positioning(const RID &p_font_rid, Te
fd->subpixel_positioning = p_subpixel;
}
-TextServer::SubpixelPositioning TextServerAdvanced::font_get_subpixel_positioning(const RID &p_font_rid) const {
+TextServer::SubpixelPositioning TextServerAdvanced::_font_get_subpixel_positioning(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, SUBPIXEL_POSITIONING_DISABLED);
@@ -2176,7 +2190,7 @@ TextServer::SubpixelPositioning TextServerAdvanced::font_get_subpixel_positionin
return fd->subpixel_positioning;
}
-void TextServerAdvanced::font_set_embolden(const RID &p_font_rid, double p_strength) {
+void TextServerAdvanced::_font_set_embolden(const RID &p_font_rid, double p_strength) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2187,7 +2201,7 @@ void TextServerAdvanced::font_set_embolden(const RID &p_font_rid, double p_stren
}
}
-double TextServerAdvanced::font_get_embolden(const RID &p_font_rid) const {
+double TextServerAdvanced::_font_get_embolden(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2195,7 +2209,7 @@ double TextServerAdvanced::font_get_embolden(const RID &p_font_rid) const {
return fd->embolden;
}
-void TextServerAdvanced::font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
+void TextServerAdvanced::_font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2206,7 +2220,7 @@ void TextServerAdvanced::font_set_transform(const RID &p_font_rid, const Transfo
}
}
-Transform2D TextServerAdvanced::font_get_transform(const RID &p_font_rid) const {
+Transform2D TextServerAdvanced::_font_get_transform(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Transform2D());
@@ -2214,7 +2228,7 @@ Transform2D TextServerAdvanced::font_get_transform(const RID &p_font_rid) const
return fd->transform;
}
-void TextServerAdvanced::font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {
+void TextServerAdvanced::_font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2225,7 +2239,7 @@ void TextServerAdvanced::font_set_variation_coordinates(const RID &p_font_rid, c
}
}
-Dictionary TextServerAdvanced::font_get_variation_coordinates(const RID &p_font_rid) const {
+Dictionary TextServerAdvanced::_font_get_variation_coordinates(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -2233,7 +2247,7 @@ Dictionary TextServerAdvanced::font_get_variation_coordinates(const RID &p_font_
return fd->variation_coordinates;
}
-void TextServerAdvanced::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
+void TextServerAdvanced::_font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2244,7 +2258,7 @@ void TextServerAdvanced::font_set_oversampling(const RID &p_font_rid, double p_o
}
}
-double TextServerAdvanced::font_get_oversampling(const RID &p_font_rid) const {
+double TextServerAdvanced::_font_get_oversampling(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2252,7 +2266,7 @@ double TextServerAdvanced::font_get_oversampling(const RID &p_font_rid) const {
return fd->oversampling;
}
-TypedArray<Vector2i> TextServerAdvanced::font_get_size_cache_list(const RID &p_font_rid) const {
+TypedArray<Vector2i> TextServerAdvanced::_font_get_size_cache_list(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, TypedArray<Vector2i>());
@@ -2264,7 +2278,7 @@ TypedArray<Vector2i> TextServerAdvanced::font_get_size_cache_list(const RID &p_f
return ret;
}
-void TextServerAdvanced::font_clear_size_cache(const RID &p_font_rid) {
+void TextServerAdvanced::_font_clear_size_cache(const RID &p_font_rid) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2275,7 +2289,7 @@ void TextServerAdvanced::font_clear_size_cache(const RID &p_font_rid) {
fd->cache.clear();
}
-void TextServerAdvanced::font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {
+void TextServerAdvanced::_font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2286,7 +2300,7 @@ void TextServerAdvanced::font_remove_size_cache(const RID &p_font_rid, const Vec
}
}
-void TextServerAdvanced::font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {
+void TextServerAdvanced::_font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2297,7 +2311,7 @@ void TextServerAdvanced::font_set_ascent(const RID &p_font_rid, int64_t p_size,
fd->cache[size]->ascent = p_ascent;
}
-double TextServerAdvanced::font_get_ascent(const RID &p_font_rid, int64_t p_size) const {
+double TextServerAdvanced::_font_get_ascent(const RID &p_font_rid, int64_t p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2313,7 +2327,7 @@ double TextServerAdvanced::font_get_ascent(const RID &p_font_rid, int64_t p_size
}
}
-void TextServerAdvanced::font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {
+void TextServerAdvanced::_font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2323,7 +2337,7 @@ void TextServerAdvanced::font_set_descent(const RID &p_font_rid, int64_t p_size,
fd->cache[size]->descent = p_descent;
}
-double TextServerAdvanced::font_get_descent(const RID &p_font_rid, int64_t p_size) const {
+double TextServerAdvanced::_font_get_descent(const RID &p_font_rid, int64_t p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2339,7 +2353,7 @@ double TextServerAdvanced::font_get_descent(const RID &p_font_rid, int64_t p_siz
}
}
-void TextServerAdvanced::font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {
+void TextServerAdvanced::_font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2350,7 +2364,7 @@ void TextServerAdvanced::font_set_underline_position(const RID &p_font_rid, int6
fd->cache[size]->underline_position = p_underline_position;
}
-double TextServerAdvanced::font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {
+double TextServerAdvanced::_font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2366,7 +2380,7 @@ double TextServerAdvanced::font_get_underline_position(const RID &p_font_rid, in
}
}
-void TextServerAdvanced::font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {
+void TextServerAdvanced::_font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2377,7 +2391,7 @@ void TextServerAdvanced::font_set_underline_thickness(const RID &p_font_rid, int
fd->cache[size]->underline_thickness = p_underline_thickness;
}
-double TextServerAdvanced::font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {
+double TextServerAdvanced::_font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2393,7 +2407,7 @@ double TextServerAdvanced::font_get_underline_thickness(const RID &p_font_rid, i
}
}
-void TextServerAdvanced::font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {
+void TextServerAdvanced::_font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2409,7 +2423,7 @@ void TextServerAdvanced::font_set_scale(const RID &p_font_rid, int64_t p_size, d
fd->cache[size]->scale = p_scale;
}
-double TextServerAdvanced::font_get_scale(const RID &p_font_rid, int64_t p_size) const {
+double TextServerAdvanced::_font_get_scale(const RID &p_font_rid, int64_t p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -2425,7 +2439,7 @@ double TextServerAdvanced::font_get_scale(const RID &p_font_rid, int64_t p_size)
}
}
-int64_t TextServerAdvanced::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
+int64_t TextServerAdvanced::_font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -2437,7 +2451,7 @@ int64_t TextServerAdvanced::font_get_texture_count(const RID &p_font_rid, const
return fd->cache[size]->textures.size();
}
-void TextServerAdvanced::font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {
+void TextServerAdvanced::_font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
MutexLock lock(fd->mutex);
@@ -2447,7 +2461,7 @@ void TextServerAdvanced::font_clear_textures(const RID &p_font_rid, const Vector
fd->cache[size]->textures.clear();
}
-void TextServerAdvanced::font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {
+void TextServerAdvanced::_font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2459,7 +2473,7 @@ void TextServerAdvanced::font_remove_texture(const RID &p_font_rid, const Vector
fd->cache[size]->textures.remove_at(p_texture_index);
}
-void TextServerAdvanced::font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {
+void TextServerAdvanced::_font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
ERR_FAIL_COND(p_image.is_null());
@@ -2490,7 +2504,7 @@ void TextServerAdvanced::font_set_texture_image(const RID &p_font_rid, const Vec
tex.dirty = false;
}
-Ref<Image> TextServerAdvanced::font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
+Ref<Image> TextServerAdvanced::_font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Ref<Image>());
@@ -2507,7 +2521,7 @@ Ref<Image> TextServerAdvanced::font_get_texture_image(const RID &p_font_rid, con
return img;
}
-void TextServerAdvanced::font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {
+void TextServerAdvanced::_font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2523,7 +2537,7 @@ void TextServerAdvanced::font_set_texture_offsets(const RID &p_font_rid, const V
tex.offsets = p_offset;
}
-PackedInt32Array TextServerAdvanced::font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
+PackedInt32Array TextServerAdvanced::_font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedInt32Array());
@@ -2536,7 +2550,7 @@ PackedInt32Array TextServerAdvanced::font_get_texture_offsets(const RID &p_font_
return tex.offsets;
}
-PackedInt32Array TextServerAdvanced::font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {
+PackedInt32Array TextServerAdvanced::_font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedInt32Array());
@@ -2552,7 +2566,7 @@ PackedInt32Array TextServerAdvanced::font_get_glyph_list(const RID &p_font_rid,
return ret;
}
-void TextServerAdvanced::font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {
+void TextServerAdvanced::_font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2563,7 +2577,7 @@ void TextServerAdvanced::font_clear_glyphs(const RID &p_font_rid, const Vector2i
fd->cache[size]->glyph_map.clear();
}
-void TextServerAdvanced::font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {
+void TextServerAdvanced::_font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2588,7 +2602,7 @@ double TextServerAdvanced::_get_extra_advance(RID p_font_rid, int p_font_size) c
}
}
-Vector2 TextServerAdvanced::font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {
+Vector2 TextServerAdvanced::_font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -2599,7 +2613,7 @@ Vector2 TextServerAdvanced::font_get_glyph_advance(const RID &p_font_rid, int64_
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2625,7 +2639,7 @@ Vector2 TextServerAdvanced::font_get_glyph_advance(const RID &p_font_rid, int64_
}
}
-void TextServerAdvanced::font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {
+void TextServerAdvanced::_font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2640,7 +2654,7 @@ void TextServerAdvanced::font_set_glyph_advance(const RID &p_font_rid, int64_t p
gl[p_glyph].found = true;
}
-Vector2 TextServerAdvanced::font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Vector2 TextServerAdvanced::_font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -2651,7 +2665,7 @@ Vector2 TextServerAdvanced::font_get_glyph_offset(const RID &p_font_rid, const V
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2670,7 +2684,7 @@ Vector2 TextServerAdvanced::font_get_glyph_offset(const RID &p_font_rid, const V
}
}
-void TextServerAdvanced::font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {
+void TextServerAdvanced::_font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2685,7 +2699,7 @@ void TextServerAdvanced::font_set_glyph_offset(const RID &p_font_rid, const Vect
gl[p_glyph].found = true;
}
-Vector2 TextServerAdvanced::font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Vector2 TextServerAdvanced::_font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -2696,7 +2710,7 @@ Vector2 TextServerAdvanced::font_get_glyph_size(const RID &p_font_rid, const Vec
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2715,7 +2729,7 @@ Vector2 TextServerAdvanced::font_get_glyph_size(const RID &p_font_rid, const Vec
}
}
-void TextServerAdvanced::font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {
+void TextServerAdvanced::_font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2730,7 +2744,7 @@ void TextServerAdvanced::font_set_glyph_size(const RID &p_font_rid, const Vector
gl[p_glyph].found = true;
}
-Rect2 TextServerAdvanced::font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Rect2 TextServerAdvanced::_font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Rect2());
@@ -2741,7 +2755,7 @@ Rect2 TextServerAdvanced::font_get_glyph_uv_rect(const RID &p_font_rid, const Ve
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2755,7 +2769,7 @@ Rect2 TextServerAdvanced::font_get_glyph_uv_rect(const RID &p_font_rid, const Ve
return gl[p_glyph | mod].uv_rect;
}
-void TextServerAdvanced::font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {
+void TextServerAdvanced::_font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2770,7 +2784,7 @@ void TextServerAdvanced::font_set_glyph_uv_rect(const RID &p_font_rid, const Vec
gl[p_glyph].found = true;
}
-int64_t TextServerAdvanced::font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+int64_t TextServerAdvanced::_font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, -1);
@@ -2781,7 +2795,7 @@ int64_t TextServerAdvanced::font_get_glyph_texture_idx(const RID &p_font_rid, co
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2795,7 +2809,7 @@ int64_t TextServerAdvanced::font_get_glyph_texture_idx(const RID &p_font_rid, co
return gl[p_glyph | mod].texture_idx;
}
-void TextServerAdvanced::font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {
+void TextServerAdvanced::_font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2810,7 +2824,7 @@ void TextServerAdvanced::font_set_glyph_texture_idx(const RID &p_font_rid, const
gl[p_glyph].found = true;
}
-RID TextServerAdvanced::font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+RID TextServerAdvanced::_font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, RID());
@@ -2821,7 +2835,7 @@ RID TextServerAdvanced::font_get_glyph_texture_rid(const RID &p_font_rid, const
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2858,7 +2872,7 @@ RID TextServerAdvanced::font_get_glyph_texture_rid(const RID &p_font_rid, const
return RID();
}
-Size2 TextServerAdvanced::font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Size2 TextServerAdvanced::_font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Size2());
@@ -2869,7 +2883,7 @@ Size2 TextServerAdvanced::font_get_glyph_texture_size(const RID &p_font_rid, con
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -2906,7 +2920,7 @@ Size2 TextServerAdvanced::font_get_glyph_texture_size(const RID &p_font_rid, con
return Size2();
}
-Dictionary TextServerAdvanced::font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {
+Dictionary TextServerAdvanced::_font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -2956,7 +2970,7 @@ Dictionary TextServerAdvanced::font_get_glyph_contours(const RID &p_font_rid, in
#endif
}
-TypedArray<Vector2i> TextServerAdvanced::font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {
+TypedArray<Vector2i> TextServerAdvanced::_font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, TypedArray<Vector2i>());
@@ -2972,7 +2986,7 @@ TypedArray<Vector2i> TextServerAdvanced::font_get_kerning_list(const RID &p_font
return ret;
}
-void TextServerAdvanced::font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {
+void TextServerAdvanced::_font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2983,7 +2997,7 @@ void TextServerAdvanced::font_clear_kerning_map(const RID &p_font_rid, int64_t p
fd->cache[size]->kerning_map.clear();
}
-void TextServerAdvanced::font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {
+void TextServerAdvanced::_font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2994,7 +3008,7 @@ void TextServerAdvanced::font_remove_kerning(const RID &p_font_rid, int64_t p_si
fd->cache[size]->kerning_map.erase(p_glyph_pair);
}
-void TextServerAdvanced::font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
+void TextServerAdvanced::_font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3005,7 +3019,7 @@ void TextServerAdvanced::font_set_kerning(const RID &p_font_rid, int64_t p_size,
fd->cache[size]->kerning_map[p_glyph_pair] = p_kerning;
}
-Vector2 TextServerAdvanced::font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {
+Vector2 TextServerAdvanced::_font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -3038,7 +3052,7 @@ Vector2 TextServerAdvanced::font_get_kerning(const RID &p_font_rid, int64_t p_si
return Vector2();
}
-int64_t TextServerAdvanced::font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector) const {
+int64_t TextServerAdvanced::_font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
ERR_FAIL_COND_V_MSG((p_char >= 0xd800 && p_char <= 0xdfff) || (p_char > 0x10ffff), 0, "Unicode parsing error: Invalid unicode codepoint " + String::num_int64(p_char, 16) + ".");
@@ -3063,7 +3077,7 @@ int64_t TextServerAdvanced::font_get_glyph_index(const RID &p_font_rid, int64_t
#endif
}
-bool TextServerAdvanced::font_has_char(const RID &p_font_rid, int64_t p_char) const {
+bool TextServerAdvanced::_font_has_char(const RID &p_font_rid, int64_t p_char) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V_MSG((p_char >= 0xd800 && p_char <= 0xdfff) || (p_char > 0x10ffff), false, "Unicode parsing error: Invalid unicode codepoint " + String::num_int64(p_char, 16) + ".");
if (!fd) {
@@ -3084,7 +3098,7 @@ bool TextServerAdvanced::font_has_char(const RID &p_font_rid, int64_t p_char) co
return (at_size) ? at_size->glyph_map.has((int32_t)p_char) : false;
}
-String TextServerAdvanced::font_get_supported_chars(const RID &p_font_rid) const {
+String TextServerAdvanced::_font_get_supported_chars(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
@@ -3117,7 +3131,7 @@ String TextServerAdvanced::font_get_supported_chars(const RID &p_font_rid) const
return chars;
}
-void TextServerAdvanced::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
+void TextServerAdvanced::_font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
ERR_FAIL_COND_MSG((p_start >= 0xd800 && p_start <= 0xdfff) || (p_start > 0x10ffff), "Unicode parsing error: Invalid unicode codepoint " + String::num_int64(p_start, 16) + ".");
@@ -3152,7 +3166,7 @@ void TextServerAdvanced::font_render_range(const RID &p_font_rid, const Vector2i
}
}
-void TextServerAdvanced::font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {
+void TextServerAdvanced::_font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3183,7 +3197,7 @@ void TextServerAdvanced::font_render_glyph(const RID &p_font_rid, const Vector2i
#endif
}
-void TextServerAdvanced::font_draw_glyph(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
+void TextServerAdvanced::_font_draw_glyph(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3198,7 +3212,7 @@ void TextServerAdvanced::font_draw_glyph(const RID &p_font_rid, const RID &p_can
if (!fd->msdf && fd->cache[size]->face) {
// LCD layout, bits 24, 25, 26
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
lcd_aa = true;
index = index | (layout << 24);
@@ -3275,7 +3289,7 @@ void TextServerAdvanced::font_draw_glyph(const RID &p_font_rid, const RID &p_can
}
}
-void TextServerAdvanced::font_draw_glyph_outline(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
+void TextServerAdvanced::_font_draw_glyph_outline(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3290,7 +3304,7 @@ void TextServerAdvanced::font_draw_glyph_outline(const RID &p_font_rid, const RI
if (!fd->msdf && fd->cache[size]->face) {
// LCD layout, bits 24, 25, 26
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
lcd_aa = true;
index = index | (layout << 24);
@@ -3367,7 +3381,7 @@ void TextServerAdvanced::font_draw_glyph_outline(const RID &p_font_rid, const RI
}
}
-bool TextServerAdvanced::font_is_language_supported(const RID &p_font_rid, const String &p_language) const {
+bool TextServerAdvanced::_font_is_language_supported(const RID &p_font_rid, const String &p_language) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -3379,7 +3393,7 @@ bool TextServerAdvanced::font_is_language_supported(const RID &p_font_rid, const
}
}
-void TextServerAdvanced::font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {
+void TextServerAdvanced::_font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3387,7 +3401,7 @@ void TextServerAdvanced::font_set_language_support_override(const RID &p_font_ri
fd->language_support_overrides[p_language] = p_supported;
}
-bool TextServerAdvanced::font_get_language_support_override(const RID &p_font_rid, const String &p_language) {
+bool TextServerAdvanced::_font_get_language_support_override(const RID &p_font_rid, const String &p_language) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -3395,7 +3409,7 @@ bool TextServerAdvanced::font_get_language_support_override(const RID &p_font_ri
return fd->language_support_overrides[p_language];
}
-void TextServerAdvanced::font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {
+void TextServerAdvanced::_font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3403,7 +3417,7 @@ void TextServerAdvanced::font_remove_language_support_override(const RID &p_font
fd->language_support_overrides.erase(p_language);
}
-PackedStringArray TextServerAdvanced::font_get_language_support_overrides(const RID &p_font_rid) {
+PackedStringArray TextServerAdvanced::_font_get_language_support_overrides(const RID &p_font_rid) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedStringArray());
@@ -3415,7 +3429,7 @@ PackedStringArray TextServerAdvanced::font_get_language_support_overrides(const
return out;
}
-bool TextServerAdvanced::font_is_script_supported(const RID &p_font_rid, const String &p_script) const {
+bool TextServerAdvanced::_font_is_script_supported(const RID &p_font_rid, const String &p_script) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -3429,7 +3443,7 @@ bool TextServerAdvanced::font_is_script_supported(const RID &p_font_rid, const S
}
}
-void TextServerAdvanced::font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {
+void TextServerAdvanced::_font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3437,7 +3451,7 @@ void TextServerAdvanced::font_set_script_support_override(const RID &p_font_rid,
fd->script_support_overrides[p_script] = p_supported;
}
-bool TextServerAdvanced::font_get_script_support_override(const RID &p_font_rid, const String &p_script) {
+bool TextServerAdvanced::_font_get_script_support_override(const RID &p_font_rid, const String &p_script) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -3445,7 +3459,7 @@ bool TextServerAdvanced::font_get_script_support_override(const RID &p_font_rid,
return fd->script_support_overrides[p_script];
}
-void TextServerAdvanced::font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {
+void TextServerAdvanced::_font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3453,7 +3467,7 @@ void TextServerAdvanced::font_remove_script_support_override(const RID &p_font_r
fd->script_support_overrides.erase(p_script);
}
-PackedStringArray TextServerAdvanced::font_get_script_support_overrides(const RID &p_font_rid) {
+PackedStringArray TextServerAdvanced::_font_get_script_support_overrides(const RID &p_font_rid) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedStringArray());
@@ -3465,7 +3479,7 @@ PackedStringArray TextServerAdvanced::font_get_script_support_overrides(const RI
return out;
}
-void TextServerAdvanced::font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {
+void TextServerAdvanced::_font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -3475,7 +3489,7 @@ void TextServerAdvanced::font_set_opentype_feature_overrides(const RID &p_font_r
fd->feature_overrides = p_overrides;
}
-Dictionary TextServerAdvanced::font_get_opentype_feature_overrides(const RID &p_font_rid) const {
+Dictionary TextServerAdvanced::_font_get_opentype_feature_overrides(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -3483,7 +3497,7 @@ Dictionary TextServerAdvanced::font_get_opentype_feature_overrides(const RID &p_
return fd->feature_overrides;
}
-Dictionary TextServerAdvanced::font_supported_feature_list(const RID &p_font_rid) const {
+Dictionary TextServerAdvanced::_font_supported_feature_list(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -3493,7 +3507,7 @@ Dictionary TextServerAdvanced::font_supported_feature_list(const RID &p_font_rid
return fd->supported_features;
}
-Dictionary TextServerAdvanced::font_supported_variation_list(const RID &p_font_rid) const {
+Dictionary TextServerAdvanced::_font_supported_variation_list(const RID &p_font_rid) const {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -3503,11 +3517,11 @@ Dictionary TextServerAdvanced::font_supported_variation_list(const RID &p_font_r
return fd->supported_varaitions;
}
-double TextServerAdvanced::font_get_global_oversampling() const {
+double TextServerAdvanced::_font_get_global_oversampling() const {
return oversampling;
}
-void TextServerAdvanced::font_set_global_oversampling(double p_oversampling) {
+void TextServerAdvanced::_font_set_global_oversampling(double p_oversampling) {
_THREAD_SAFE_METHOD_
if (oversampling != p_oversampling) {
oversampling = p_oversampling;
@@ -3515,8 +3529,8 @@ void TextServerAdvanced::font_set_global_oversampling(double p_oversampling) {
font_owner.get_owned_list(&fonts);
bool font_cleared = false;
for (const RID &E : fonts) {
- if (!font_is_multichannel_signed_distance_field(E) && font_get_oversampling(E) <= 0) {
- font_clear_size_cache(E);
+ if (!_font_is_multichannel_signed_distance_field(E) && _font_get_oversampling(E) <= 0) {
+ _font_clear_size_cache(E);
font_cleared = true;
}
}
@@ -3625,7 +3639,7 @@ void TextServerAdvanced::full_copy(ShapedTextDataAdvanced *p_shaped) {
p_shaped->parent = RID();
}
-RID TextServerAdvanced::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
+RID TextServerAdvanced::_create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
_THREAD_SAFE_METHOD_
ShapedTextDataAdvanced *sd = memnew(ShapedTextDataAdvanced);
@@ -3635,7 +3649,7 @@ RID TextServerAdvanced::create_shaped_text(TextServer::Direction p_direction, Te
return shaped_owner.make_rid(sd);
}
-void TextServerAdvanced::shaped_text_clear(const RID &p_shaped) {
+void TextServerAdvanced::_shaped_text_clear(const RID &p_shaped) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3650,7 +3664,7 @@ void TextServerAdvanced::shaped_text_clear(const RID &p_shaped) {
invalidate(sd, true);
}
-void TextServerAdvanced::shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {
+void TextServerAdvanced::_shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3664,7 +3678,7 @@ void TextServerAdvanced::shaped_text_set_direction(const RID &p_shaped, TextServ
}
}
-TextServer::Direction TextServerAdvanced::shaped_text_get_direction(const RID &p_shaped) const {
+TextServer::Direction TextServerAdvanced::_shaped_text_get_direction(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::DIRECTION_LTR);
@@ -3672,7 +3686,7 @@ TextServer::Direction TextServerAdvanced::shaped_text_get_direction(const RID &p
return sd->direction;
}
-TextServer::Direction TextServerAdvanced::shaped_text_get_inferred_direction(const RID &p_shaped) const {
+TextServer::Direction TextServerAdvanced::_shaped_text_get_inferred_direction(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::DIRECTION_LTR);
@@ -3680,7 +3694,7 @@ TextServer::Direction TextServerAdvanced::shaped_text_get_inferred_direction(con
return sd->para_direction;
}
-void TextServerAdvanced::shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {
+void TextServerAdvanced::_shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {
_THREAD_SAFE_METHOD_
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3694,14 +3708,14 @@ void TextServerAdvanced::shaped_text_set_custom_punctuation(const RID &p_shaped,
}
}
-String TextServerAdvanced::shaped_text_get_custom_punctuation(const RID &p_shaped) const {
+String TextServerAdvanced::_shaped_text_get_custom_punctuation(const RID &p_shaped) const {
_THREAD_SAFE_METHOD_
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, String());
return sd->custom_punct;
}
-void TextServerAdvanced::shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {
+void TextServerAdvanced::_shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3718,7 +3732,7 @@ void TextServerAdvanced::shaped_text_set_bidi_override(const RID &p_shaped, cons
invalidate(sd, false);
}
-void TextServerAdvanced::shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {
+void TextServerAdvanced::_shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3732,7 +3746,7 @@ void TextServerAdvanced::shaped_text_set_orientation(const RID &p_shaped, TextSe
}
}
-void TextServerAdvanced::shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {
+void TextServerAdvanced::_shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3744,7 +3758,7 @@ void TextServerAdvanced::shaped_text_set_preserve_invalid(const RID &p_shaped, b
}
}
-bool TextServerAdvanced::shaped_text_get_preserve_invalid(const RID &p_shaped) const {
+bool TextServerAdvanced::_shaped_text_get_preserve_invalid(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -3752,7 +3766,7 @@ bool TextServerAdvanced::shaped_text_get_preserve_invalid(const RID &p_shaped) c
return sd->preserve_invalid;
}
-void TextServerAdvanced::shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {
+void TextServerAdvanced::_shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3766,7 +3780,7 @@ void TextServerAdvanced::shaped_text_set_preserve_control(const RID &p_shaped, b
}
}
-bool TextServerAdvanced::shaped_text_get_preserve_control(const RID &p_shaped) const {
+bool TextServerAdvanced::_shaped_text_get_preserve_control(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -3774,7 +3788,7 @@ bool TextServerAdvanced::shaped_text_get_preserve_control(const RID &p_shaped) c
return sd->preserve_control;
}
-void TextServerAdvanced::shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) {
+void TextServerAdvanced::_shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) {
ERR_FAIL_INDEX((int)p_spacing, 4);
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -3789,7 +3803,7 @@ void TextServerAdvanced::shaped_text_set_spacing(const RID &p_shaped, SpacingTyp
}
}
-int64_t TextServerAdvanced::shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const {
+int64_t TextServerAdvanced::_shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const {
ERR_FAIL_INDEX_V((int)p_spacing, 4, 0);
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
@@ -3799,7 +3813,7 @@ int64_t TextServerAdvanced::shaped_text_get_spacing(const RID &p_shaped, Spacing
return sd->extra_spacing[p_spacing];
}
-TextServer::Orientation TextServerAdvanced::shaped_text_get_orientation(const RID &p_shaped) const {
+TextServer::Orientation TextServerAdvanced::_shaped_text_get_orientation(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::ORIENTATION_HORIZONTAL);
@@ -3807,20 +3821,20 @@ TextServer::Orientation TextServerAdvanced::shaped_text_get_orientation(const RI
return sd->orientation;
}
-int64_t TextServerAdvanced::shaped_get_span_count(const RID &p_shaped) const {
+int64_t TextServerAdvanced::_shaped_get_span_count(const RID &p_shaped) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0);
return sd->spans.size();
}
-Variant TextServerAdvanced::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
+Variant TextServerAdvanced::_shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Variant());
ERR_FAIL_INDEX_V(p_index, sd->spans.size(), Variant());
return sd->spans[p_index].meta;
}
-void TextServerAdvanced::shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
+void TextServerAdvanced::_shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
ERR_FAIL_INDEX(p_index, sd->spans.size());
@@ -3833,7 +3847,7 @@ void TextServerAdvanced::shaped_set_span_update_font(const RID &p_shaped, int64_
invalidate(sd, false);
}
-bool TextServerAdvanced::shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {
+bool TextServerAdvanced::_shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
ERR_FAIL_COND_V(p_size <= 0, false);
@@ -3868,7 +3882,7 @@ bool TextServerAdvanced::shaped_text_add_string(const RID &p_shaped, const Strin
return true;
}
-bool TextServerAdvanced::shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, int64_t p_length) {
+bool TextServerAdvanced::_shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, int64_t p_length) {
_THREAD_SAFE_METHOD_
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -3898,7 +3912,7 @@ bool TextServerAdvanced::shaped_text_add_object(const RID &p_shaped, const Varia
return true;
}
-bool TextServerAdvanced::shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align) {
+bool TextServerAdvanced::_shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -3939,14 +3953,14 @@ bool TextServerAdvanced::shaped_text_resize_object(const RID &p_shaped, const Va
} else {
if (gl.font_rid.is_valid()) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- sd->ascent = MAX(sd->ascent, MAX(font_get_ascent(gl.font_rid, gl.font_size), -gl.y_off));
- sd->descent = MAX(sd->descent, MAX(font_get_descent(gl.font_rid, gl.font_size), gl.y_off));
+ sd->ascent = MAX(sd->ascent, MAX(_font_get_ascent(gl.font_rid, gl.font_size), -gl.y_off));
+ sd->descent = MAX(sd->descent, MAX(_font_get_descent(gl.font_rid, gl.font_size), gl.y_off));
} else {
- sd->ascent = MAX(sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
- sd->descent = MAX(sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->ascent = MAX(sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->descent = MAX(sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
- sd->upos = MAX(sd->upos, font_get_underline_position(gl.font_rid, gl.font_size));
- sd->uthk = MAX(sd->uthk, font_get_underline_thickness(gl.font_rid, gl.font_size));
+ sd->upos = MAX(sd->upos, _font_get_underline_position(gl.font_rid, gl.font_size));
+ sd->uthk = MAX(sd->uthk, _font_get_underline_thickness(gl.font_rid, gl.font_size));
} else if (sd->preserve_invalid || (sd->preserve_control && is_control(gl.index))) {
// Glyph not found, replace with hex code box.
if (sd->orientation == ORIENTATION_HORIZONTAL) {
@@ -4033,7 +4047,7 @@ void TextServerAdvanced::_realign(ShapedTextDataAdvanced *p_sd) const {
p_sd->descent = full_descent;
}
-RID TextServerAdvanced::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
+RID TextServerAdvanced::_shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
_THREAD_SAFE_METHOD_
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
@@ -4041,10 +4055,10 @@ RID TextServerAdvanced::shaped_text_substr(const RID &p_shaped, int64_t p_start,
MutexLock lock(sd->mutex);
if (sd->parent != RID()) {
- return shaped_text_substr(sd->parent, p_start, p_length);
+ return _shaped_text_substr(sd->parent, p_start, p_length);
}
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
ERR_FAIL_COND_V(p_start < 0 || p_length < 0, RID());
ERR_FAIL_COND_V(sd->start > p_start || sd->end < p_start, RID());
@@ -4148,11 +4162,11 @@ bool TextServerAdvanced::_shape_substr(ShapedTextDataAdvanced *p_new_sd, const S
} else {
if (gl.font_rid.is_valid()) {
if (p_new_sd->orientation == ORIENTATION_HORIZONTAL) {
- p_new_sd->ascent = MAX(p_new_sd->ascent, MAX(font_get_ascent(gl.font_rid, gl.font_size), -gl.y_off));
- p_new_sd->descent = MAX(p_new_sd->descent, MAX(font_get_descent(gl.font_rid, gl.font_size), gl.y_off));
+ p_new_sd->ascent = MAX(p_new_sd->ascent, MAX(_font_get_ascent(gl.font_rid, gl.font_size), -gl.y_off));
+ p_new_sd->descent = MAX(p_new_sd->descent, MAX(_font_get_descent(gl.font_rid, gl.font_size), gl.y_off));
} else {
- p_new_sd->ascent = MAX(p_new_sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
- p_new_sd->descent = MAX(p_new_sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ p_new_sd->ascent = MAX(p_new_sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ p_new_sd->descent = MAX(p_new_sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
} else if (p_new_sd->preserve_invalid || (p_new_sd->preserve_control && is_control(gl.index))) {
// Glyph not found, replace with hex code box.
@@ -4178,7 +4192,7 @@ bool TextServerAdvanced::_shape_substr(ShapedTextDataAdvanced *p_new_sd, const S
return true;
}
-RID TextServerAdvanced::shaped_text_get_parent(const RID &p_shaped) const {
+RID TextServerAdvanced::_shaped_text_get_parent(const RID &p_shaped) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, RID());
@@ -4186,16 +4200,16 @@ RID TextServerAdvanced::shaped_text_get_parent(const RID &p_shaped) const {
return sd->parent;
}
-double TextServerAdvanced::shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags) {
+double TextServerAdvanced::_shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
if (!sd->justification_ops_valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_update_justification_ops(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_update_justification_ops(p_shaped);
}
sd->fit_width_minimum_reached = false;
@@ -4343,16 +4357,16 @@ double TextServerAdvanced::shaped_text_fit_to_width(const RID &p_shaped, double
return Math::ceil(justification_width);
}
-double TextServerAdvanced::shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {
+double TextServerAdvanced::_shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
if (!sd->line_breaks_valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_update_breaks(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_update_breaks(p_shaped);
}
for (int i = 0; i < p_tab_stops.size(); i++) {
@@ -4399,13 +4413,13 @@ double TextServerAdvanced::shaped_text_tab_align(const RID &p_shaped, const Pack
return 0.0;
}
-void TextServerAdvanced::shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {
+void TextServerAdvanced::_shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped_line);
ERR_FAIL_COND_MSG(!sd, "ShapedTextDataAdvanced invalid.");
MutexLock lock(sd->mutex);
if (!sd->valid) {
- shaped_text_shape(p_shaped_line);
+ _shaped_text_shape(p_shaped_line);
}
sd->text_trimmed = false;
@@ -4444,30 +4458,30 @@ void TextServerAdvanced::shaped_text_overrun_trim_to_width(const RID &p_shaped_l
// Find usable fonts, if fonts from the last glyph do not have required chars.
RID dot_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
- if (!font_has_char(dot_gl_font_rid, '.')) {
+ if (!_font_has_char(dot_gl_font_rid, '.')) {
const Array &fonts = spans[spans.size() - 1].fonts;
for (int i = 0; i < fonts.size(); i++) {
- if (font_has_char(fonts[i], '.')) {
+ if (_font_has_char(fonts[i], '.')) {
dot_gl_font_rid = fonts[i];
break;
}
}
}
RID whitespace_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
- if (!font_has_char(whitespace_gl_font_rid, '.')) {
+ if (!_font_has_char(whitespace_gl_font_rid, '.')) {
const Array &fonts = spans[spans.size() - 1].fonts;
for (int i = 0; i < fonts.size(); i++) {
- if (font_has_char(fonts[i], ' ')) {
+ if (_font_has_char(fonts[i], ' ')) {
whitespace_gl_font_rid = fonts[i];
break;
}
}
}
- int32_t dot_gl_idx = dot_gl_font_rid.is_valid() ? font_get_glyph_index(dot_gl_font_rid, last_gl_font_size, '.') : -10;
- Vector2 dot_adv = dot_gl_font_rid.is_valid() ? font_get_glyph_advance(dot_gl_font_rid, last_gl_font_size, dot_gl_idx) : Vector2();
- int32_t whitespace_gl_idx = whitespace_gl_font_rid.is_valid() ? font_get_glyph_index(whitespace_gl_font_rid, last_gl_font_size, ' ') : -10;
- Vector2 whitespace_adv = whitespace_gl_font_rid.is_valid() ? font_get_glyph_advance(whitespace_gl_font_rid, last_gl_font_size, whitespace_gl_idx) : Vector2();
+ int32_t dot_gl_idx = dot_gl_font_rid.is_valid() ? _font_get_glyph_index(dot_gl_font_rid, last_gl_font_size, '.', 0) : -10;
+ Vector2 dot_adv = dot_gl_font_rid.is_valid() ? _font_get_glyph_advance(dot_gl_font_rid, last_gl_font_size, dot_gl_idx) : Vector2();
+ int32_t whitespace_gl_idx = whitespace_gl_font_rid.is_valid() ? _font_get_glyph_index(whitespace_gl_font_rid, last_gl_font_size, ' ', 0) : -10;
+ Vector2 whitespace_adv = whitespace_gl_font_rid.is_valid() ? _font_get_glyph_advance(whitespace_gl_font_rid, last_gl_font_size, whitespace_gl_idx) : Vector2();
int ellipsis_width = 0;
if (add_ellipsis && whitespace_gl_font_rid.is_valid()) {
@@ -4566,7 +4580,7 @@ void TextServerAdvanced::shaped_text_overrun_trim_to_width(const RID &p_shaped_l
}
}
-int64_t TextServerAdvanced::shaped_text_get_trim_pos(const RID &p_shaped) const {
+int64_t TextServerAdvanced::_shaped_text_get_trim_pos(const RID &p_shaped) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, -1, "ShapedTextDataAdvanced invalid.");
@@ -4574,7 +4588,7 @@ int64_t TextServerAdvanced::shaped_text_get_trim_pos(const RID &p_shaped) const
return sd->overrun_trim_data.trim_pos;
}
-int64_t TextServerAdvanced::shaped_text_get_ellipsis_pos(const RID &p_shaped) const {
+int64_t TextServerAdvanced::_shaped_text_get_ellipsis_pos(const RID &p_shaped) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, -1, "ShapedTextDataAdvanced invalid.");
@@ -4582,7 +4596,7 @@ int64_t TextServerAdvanced::shaped_text_get_ellipsis_pos(const RID &p_shaped) co
return sd->overrun_trim_data.ellipsis_pos;
}
-const Glyph *TextServerAdvanced::shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {
+const Glyph *TextServerAdvanced::_shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, nullptr, "ShapedTextDataAdvanced invalid.");
@@ -4590,7 +4604,7 @@ const Glyph *TextServerAdvanced::shaped_text_get_ellipsis_glyphs(const RID &p_sh
return sd->overrun_trim_data.ellipsis_glyph_buf.ptr();
}
-int64_t TextServerAdvanced::shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {
+int64_t TextServerAdvanced::_shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, 0, "ShapedTextDataAdvanced invalid.");
@@ -4598,13 +4612,13 @@ int64_t TextServerAdvanced::shaped_text_get_ellipsis_glyph_count(const RID &p_sh
return sd->overrun_trim_data.ellipsis_glyph_buf.size();
}
-bool TextServerAdvanced::shaped_text_update_breaks(const RID &p_shaped) {
+bool TextServerAdvanced::_shaped_text_update_breaks(const RID &p_shaped) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- shaped_text_shape(p_shaped);
+ _shaped_text_shape(p_shaped);
}
if (sd->line_breaks_valid) {
@@ -4815,16 +4829,16 @@ _FORCE_INLINE_ int64_t _generate_kashida_justification_opportunies(const String
return kashida_pos;
}
-bool TextServerAdvanced::shaped_text_update_justification_ops(const RID &p_shaped) {
+bool TextServerAdvanced::_shaped_text_update_justification_ops(const RID &p_shaped) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- shaped_text_shape(p_shaped);
+ _shaped_text_shape(p_shaped);
}
if (!sd->line_breaks_valid) {
- shaped_text_update_breaks(p_shaped);
+ _shaped_text_update_breaks(p_shaped);
}
if (sd->justification_ops_valid) {
@@ -4969,7 +4983,7 @@ bool TextServerAdvanced::shaped_text_update_justification_ops(const RID &p_shape
Glyph TextServerAdvanced::_shape_single_glyph(ShapedTextDataAdvanced *p_sd, char32_t p_char, hb_script_t p_script, hb_direction_t p_direction, const RID &p_font, int64_t p_font_size) {
hb_font_t *hb_font = _font_get_hb_handle(p_font, p_font_size);
- bool subpos = (font_get_subpixel_positioning(p_font) == SUBPIXEL_POSITIONING_ONE_HALF) || (font_get_subpixel_positioning(p_font) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (font_get_subpixel_positioning(p_font) == SUBPIXEL_POSITIONING_AUTO && p_font_size <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
+ bool subpos = (_font_get_subpixel_positioning(p_font) == SUBPIXEL_POSITIONING_ONE_HALF) || (_font_get_subpixel_positioning(p_font) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (_font_get_subpixel_positioning(p_font) == SUBPIXEL_POSITIONING_AUTO && p_font_size <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
ERR_FAIL_COND_V(hb_font == nullptr, Glyph());
hb_buffer_clear_contents(p_sd->hb_buffer);
@@ -4995,7 +5009,7 @@ Glyph TextServerAdvanced::_shape_single_glyph(ShapedTextDataAdvanced *p_sd, char
gl.font_size = p_font_size;
if (glyph_count > 0) {
- double scale = font_get_scale(p_font, p_font_size);
+ double scale = _font_get_scale(p_font, p_font_size);
if (p_sd->orientation == ORIENTATION_HORIZONTAL) {
if (subpos) {
gl.advance = glyph_pos[0].x_advance / (64.0 / scale) + _get_extra_advance(p_font, p_font_size);
@@ -5030,7 +5044,7 @@ _FORCE_INLINE_ void TextServerAdvanced::_add_featuers(const Dictionary &p_source
if (value >= 0) {
hb_feature_t feature;
if (keys[i].get_type() == Variant::STRING) {
- feature.tag = name_to_tag(keys[i]);
+ feature.tag = _name_to_tag(keys[i]);
} else {
feature.tag = keys[i];
}
@@ -5081,12 +5095,12 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
Vector2i fss = _get_size(fd, fs);
hb_font_t *hb_font = _font_get_hb_handle(f, fs);
- double scale = font_get_scale(f, fs);
+ double scale = _font_get_scale(f, fs);
double sp_sp = p_sd->extra_spacing[SPACING_SPACE];
double sp_gl = p_sd->extra_spacing[SPACING_GLYPH];
bool last_run = (p_sd->end == p_end);
double ea = _get_extra_advance(f, fs);
- bool subpos = (font_get_subpixel_positioning(f) == SUBPIXEL_POSITIONING_ONE_HALF) || (font_get_subpixel_positioning(f) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (font_get_subpixel_positioning(f) == SUBPIXEL_POSITIONING_AUTO && fs <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
+ bool subpos = (_font_get_subpixel_positioning(f) == SUBPIXEL_POSITIONING_ONE_HALF) || (_font_get_subpixel_positioning(f) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (_font_get_subpixel_positioning(f) == SUBPIXEL_POSITIONING_AUTO && fs <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
ERR_FAIL_COND(hb_font == nullptr);
hb_buffer_clear_contents(p_sd->hb_buffer);
@@ -5114,7 +5128,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
hb_buffer_add_utf32(p_sd->hb_buffer, (const uint32_t *)p_sd->text.ptr(), p_sd->text.length(), p_start, p_end - p_start);
Vector<hb_feature_t> ftrs;
- _add_featuers(font_get_opentype_feature_overrides(f), ftrs);
+ _add_featuers(_font_get_opentype_feature_overrides(f), ftrs);
_add_featuers(p_sd->spans[p_span].features, ftrs);
hb_shape(hb_font, p_sd->hb_buffer, ftrs.is_empty() ? nullptr : &ftrs[0], ftrs.size());
@@ -5125,7 +5139,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -5245,7 +5259,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
p_sd->ascent = MAX(p_sd->ascent, -w[i + j].y_off);
p_sd->descent = MAX(p_sd->descent, w[i + j].y_off);
} else {
- double gla = Math::round(font_get_glyph_advance(f, fs, w[i + j].index).x * 0.5);
+ double gla = Math::round(_font_get_glyph_advance(f, fs, w[i + j].index).x * 0.5);
p_sd->ascent = MAX(p_sd->ascent, gla);
p_sd->descent = MAX(p_sd->descent, gla);
}
@@ -5268,14 +5282,14 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
if (failed_subrun_start != p_end + 1) {
_shape_run(p_sd, failed_subrun_start, failed_subrun_end, p_script, p_direction, p_fonts, p_span, p_fb_index + 1);
}
- p_sd->ascent = MAX(p_sd->ascent, font_get_ascent(f, fs));
- p_sd->descent = MAX(p_sd->descent, font_get_descent(f, fs));
- p_sd->upos = MAX(p_sd->upos, font_get_underline_position(f, fs));
- p_sd->uthk = MAX(p_sd->uthk, font_get_underline_thickness(f, fs));
+ p_sd->ascent = MAX(p_sd->ascent, _font_get_ascent(f, fs));
+ p_sd->descent = MAX(p_sd->descent, _font_get_descent(f, fs));
+ p_sd->upos = MAX(p_sd->upos, _font_get_underline_position(f, fs));
+ p_sd->uthk = MAX(p_sd->uthk, _font_get_underline_thickness(f, fs));
}
}
-bool TextServerAdvanced::shaped_text_shape(const RID &p_shaped) {
+bool TextServerAdvanced::_shaped_text_shape(const RID &p_shaped) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -5286,7 +5300,7 @@ bool TextServerAdvanced::shaped_text_shape(const RID &p_shaped) {
invalidate(sd, false);
if (sd->parent != RID()) {
- shaped_text_shape(sd->parent);
+ _shaped_text_shape(sd->parent);
ShapedTextDataAdvanced *parent_sd = shaped_owner.get_or_null(sd->parent);
ERR_FAIL_COND_V(!parent_sd->valid, false);
ERR_FAIL_COND_V(!_shape_substr(sd, parent_sd, sd->start, sd->end - sd->start), false);
@@ -5426,8 +5440,8 @@ bool TextServerAdvanced::shaped_text_shape(const RID &p_shaped) {
fonts.push_back(sd->spans[k].fonts[0]);
}
for (int l = 1; l < font_count; l++) {
- if (font_is_script_supported(span.fonts[l], script)) {
- if (font_is_language_supported(span.fonts[l], span.language)) {
+ if (_font_is_script_supported(span.fonts[l], script)) {
+ if (_font_is_language_supported(span.fonts[l], span.language)) {
fonts.push_back(sd->spans[k].fonts[l]);
} else {
fonts_scr_only.push_back(sd->spans[k].fonts[l]);
@@ -5451,7 +5465,7 @@ bool TextServerAdvanced::shaped_text_shape(const RID &p_shaped) {
return sd->valid;
}
-bool TextServerAdvanced::shaped_text_is_ready(const RID &p_shaped) const {
+bool TextServerAdvanced::_shaped_text_is_ready(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -5459,35 +5473,35 @@ bool TextServerAdvanced::shaped_text_is_ready(const RID &p_shaped) const {
return sd->valid;
}
-const Glyph *TextServerAdvanced::shaped_text_get_glyphs(const RID &p_shaped) const {
+const Glyph *TextServerAdvanced::_shaped_text_get_glyphs(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, nullptr);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->glyphs.ptr();
}
-int64_t TextServerAdvanced::shaped_text_get_glyph_count(const RID &p_shaped) const {
+int64_t TextServerAdvanced::_shaped_text_get_glyph_count(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->glyphs.size();
}
-const Glyph *TextServerAdvanced::shaped_text_sort_logical(const RID &p_shaped) {
+const Glyph *TextServerAdvanced::_shaped_text_sort_logical(const RID &p_shaped) {
ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, nullptr);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
if (!sd->sort_valid) {
@@ -5499,7 +5513,7 @@ const Glyph *TextServerAdvanced::shaped_text_sort_logical(const RID &p_shaped) {
return sd->glyphs_logical.ptr();
}
-Vector2i TextServerAdvanced::shaped_text_get_range(const RID &p_shaped) const {
+Vector2i TextServerAdvanced::_shaped_text_get_range(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector2i());
@@ -5507,7 +5521,7 @@ Vector2i TextServerAdvanced::shaped_text_get_range(const RID &p_shaped) const {
return Vector2(sd->start, sd->end);
}
-Array TextServerAdvanced::shaped_text_get_objects(const RID &p_shaped) const {
+Array TextServerAdvanced::_shaped_text_get_objects(const RID &p_shaped) const {
Array ret;
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, ret);
@@ -5520,25 +5534,25 @@ Array TextServerAdvanced::shaped_text_get_objects(const RID &p_shaped) const {
return ret;
}
-Rect2 TextServerAdvanced::shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {
+Rect2 TextServerAdvanced::_shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Rect2());
MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(!sd->objects.has(p_key), Rect2());
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->objects[p_key].rect;
}
-Size2 TextServerAdvanced::shaped_text_get_size(const RID &p_shaped) const {
+Size2 TextServerAdvanced::_shaped_text_get_size(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Size2());
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
if (sd->orientation == TextServer::ORIENTATION_HORIZONTAL) {
return Size2((sd->text_trimmed ? sd->width_trimmed : sd->width), sd->ascent + sd->descent + sd->extra_spacing[SPACING_TOP] + sd->extra_spacing[SPACING_BOTTOM]).ceil();
@@ -5547,58 +5561,58 @@ Size2 TextServerAdvanced::shaped_text_get_size(const RID &p_shaped) const {
}
}
-double TextServerAdvanced::shaped_text_get_ascent(const RID &p_shaped) const {
+double TextServerAdvanced::_shaped_text_get_ascent(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->ascent + sd->extra_spacing[SPACING_TOP];
}
-double TextServerAdvanced::shaped_text_get_descent(const RID &p_shaped) const {
+double TextServerAdvanced::_shaped_text_get_descent(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->descent + sd->extra_spacing[SPACING_BOTTOM];
}
-double TextServerAdvanced::shaped_text_get_width(const RID &p_shaped) const {
+double TextServerAdvanced::_shaped_text_get_width(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return Math::ceil(sd->text_trimmed ? sd->width_trimmed : sd->width);
}
-double TextServerAdvanced::shaped_text_get_underline_position(const RID &p_shaped) const {
+double TextServerAdvanced::_shaped_text_get_underline_position(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->upos;
}
-double TextServerAdvanced::shaped_text_get_underline_thickness(const RID &p_shaped) const {
+double TextServerAdvanced::_shaped_text_get_underline_thickness(const RID &p_shaped) const {
const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerAdvanced *>(this)->_shaped_text_shape(p_shaped);
}
return sd->uthk;
@@ -5779,7 +5793,7 @@ void TextServerAdvanced::_insert_num_systems_lang() {
}
}
-String TextServerAdvanced::format_number(const String &p_string, const String &p_language) const {
+String TextServerAdvanced::_format_number(const String &p_string, const String &p_language) const {
const StringName lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
String res = p_string;
@@ -5804,7 +5818,7 @@ String TextServerAdvanced::format_number(const String &p_string, const String &p
return res;
}
-String TextServerAdvanced::parse_number(const String &p_string, const String &p_language) const {
+String TextServerAdvanced::_parse_number(const String &p_string, const String &p_language) const {
const StringName lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
String res = p_string;
@@ -5832,7 +5846,7 @@ String TextServerAdvanced::parse_number(const String &p_string, const String &p_
return res;
}
-String TextServerAdvanced::percent_sign(const String &p_language) const {
+String TextServerAdvanced::_percent_sign(const String &p_language) const {
const StringName lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
for (int i = 0; i < num_systems.size(); i++) {
@@ -5846,7 +5860,7 @@ String TextServerAdvanced::percent_sign(const String &p_language) const {
return "%";
}
-int64_t TextServerAdvanced::is_confusable(const String &p_string, const PackedStringArray &p_dict) const {
+int64_t TextServerAdvanced::_is_confusable(const String &p_string, const PackedStringArray &p_dict) const {
UErrorCode status = U_ZERO_ERROR;
int64_t match_index = -1;
@@ -5886,7 +5900,7 @@ int64_t TextServerAdvanced::is_confusable(const String &p_string, const PackedSt
return match_index;
}
-bool TextServerAdvanced::spoof_check(const String &p_string) const {
+bool TextServerAdvanced::_spoof_check(const String &p_string) const {
UErrorCode status = U_ZERO_ERROR;
Char16String utf16 = p_string.utf16();
@@ -5908,7 +5922,7 @@ bool TextServerAdvanced::spoof_check(const String &p_string) const {
return (bitmask != 0);
}
-String TextServerAdvanced::strip_diacritics(const String &p_string) const {
+String TextServerAdvanced::_strip_diacritics(const String &p_string) const {
UErrorCode err = U_ZERO_ERROR;
// Get NFKD normalizer singleton.
@@ -5941,7 +5955,7 @@ String TextServerAdvanced::strip_diacritics(const String &p_string) const {
return result;
}
-String TextServerAdvanced::string_to_upper(const String &p_string, const String &p_language) const {
+String TextServerAdvanced::_string_to_upper(const String &p_string, const String &p_language) const {
const String lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
// Convert to UTF-16.
@@ -5960,7 +5974,7 @@ String TextServerAdvanced::string_to_upper(const String &p_string, const String
return String::utf16(upper.ptr(), len);
}
-String TextServerAdvanced::string_to_lower(const String &p_string, const String &p_language) const {
+String TextServerAdvanced::_string_to_lower(const String &p_string, const String &p_language) const {
const String lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
// Convert to UTF-16.
Char16String utf16 = p_string.utf16();
@@ -5978,7 +5992,7 @@ String TextServerAdvanced::string_to_lower(const String &p_string, const String
return String::utf16(lower.ptr(), len);
}
-PackedInt32Array TextServerAdvanced::string_get_word_breaks(const String &p_string, const String &p_language) const {
+PackedInt32Array TextServerAdvanced::_string_get_word_breaks(const String &p_string, const String &p_language) const {
const String lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
// Convert to UTF-16.
Char16String utf16 = p_string.utf16();
@@ -6026,7 +6040,7 @@ PackedInt32Array TextServerAdvanced::string_get_word_breaks(const String &p_stri
return ret;
}
-bool TextServerAdvanced::is_valid_identifier(const String &p_string) const {
+bool TextServerAdvanced::_is_valid_identifier(const String &p_string) const {
enum UAX31SequenceStatus {
SEQ_NOT_STARTED,
SEQ_STARTED,
@@ -6047,7 +6061,7 @@ bool TextServerAdvanced::is_valid_identifier(const String &p_string) const {
if (U_FAILURE(err)) {
return false; // Failed to load normalizer.
}
- bool isnurom = unorm2_isNormalized(norm_c, utf16.ptr(), utf16.length(), &err);
+ bool isnurom = unorm2_isNormalized(norm_c, utf16.get_data(), utf16.length(), &err);
if (U_FAILURE(err) || !isnurom) {
return false; // Do not conform to Normalization Form C.
}
diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h
index b9633a9b71..fb5075e835 100644
--- a/modules/text_server_adv/text_server_adv.h
+++ b/modules/text_server_adv/text_server_adv.h
@@ -42,6 +42,7 @@
#include <godot_cpp/godot.hpp>
#include <godot_cpp/core/class_db.hpp>
+#include <godot_cpp/core/ext_wrappers.gen.inc>
#include <godot_cpp/core/mutex_lock.hpp>
#include <godot_cpp/variant/array.hpp>
@@ -79,11 +80,13 @@ using namespace godot;
#else
// Headers for building as built-in module.
+#include "servers/text/text_server_extension.h"
+
+#include "core/extension/ext_wrappers.gen.inc"
#include "core/object/worker_thread_pool.h"
#include "core/templates/hash_map.h"
#include "core/templates/rid_owner.h"
#include "scene/resources/texture.h"
-#include "servers/text/text_server_extension.h"
#include "modules/modules_enabled.gen.h" // For freetype, msdfgen.
@@ -462,258 +465,259 @@ protected:
void invalidate(ShapedTextDataAdvanced *p_shaped, bool p_text = false);
public:
- virtual bool has_feature(Feature p_feature) const override;
- virtual String get_name() const override;
- virtual int64_t get_features() const override;
+ MODBIND1RC(bool, has_feature, Feature);
+ MODBIND0RC(String, get_name);
+ MODBIND0RC(int64_t, get_features);
- virtual void free_rid(const RID &p_rid) override;
- virtual bool has(const RID &p_rid) override;
- virtual bool load_support_data(const String &p_filename) override;
+ MODBIND1(free_rid, const RID &);
+ MODBIND1R(bool, has, const RID &);
+ MODBIND1R(bool, load_support_data, const String &);
- virtual String get_support_data_filename() const override;
- virtual String get_support_data_info() const override;
- virtual bool save_support_data(const String &p_filename) const override;
+ MODBIND0RC(String, get_support_data_filename);
+ MODBIND0RC(String, get_support_data_info);
+ MODBIND1RC(bool, save_support_data, const String &);
- virtual bool is_locale_right_to_left(const String &p_locale) const override;
+ MODBIND1RC(bool, is_locale_right_to_left, const String &);
- virtual int64_t name_to_tag(const String &p_name) const override;
- virtual String tag_to_name(int64_t p_tag) const override;
+ MODBIND1RC(int64_t, name_to_tag, const String &);
+ MODBIND1RC(String, tag_to_name, int64_t);
/* Font interface */
- virtual RID create_font() override;
- virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) override;
- virtual void font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) override;
+ MODBIND0R(RID, create_font);
+
+ MODBIND2(font_set_data, const RID &, const PackedByteArray &);
+ MODBIND3(font_set_data_ptr, const RID &, const uint8_t *, int64_t);
- virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) override;
- virtual int64_t font_get_face_index(const RID &p_font_rid) const override;
+ MODBIND2(font_set_face_index, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_face_index, const RID &);
- virtual int64_t font_get_face_count(const RID &p_font_rid) const override;
+ MODBIND1RC(int64_t, font_get_face_count, const RID &);
- virtual void font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) override;
- virtual BitField<FontStyle> font_get_style(const RID &p_font_rid) const override;
+ MODBIND2(font_set_style, const RID &, BitField<FontStyle>);
+ MODBIND1RC(BitField<FontStyle>, font_get_style, const RID &);
- virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) override;
- virtual String font_get_style_name(const RID &p_font_rid) const override;
+ MODBIND2(font_set_style_name, const RID &, const String &);
+ MODBIND1RC(String, font_get_style_name, const RID &);
- virtual void font_set_name(const RID &p_font_rid, const String &p_name) override;
- virtual String font_get_name(const RID &p_font_rid) const override;
+ MODBIND2(font_set_name, const RID &, const String &);
+ MODBIND1RC(String, font_get_name, const RID &);
- virtual void font_set_antialiasing(RID p_font_rid, TextServer::FontAntialiasing p_antialiasing) override;
- virtual TextServer::FontAntialiasing font_get_antialiasing(RID p_font_rid) const override;
+ MODBIND2(font_set_antialiasing, const RID &, TextServer::FontAntialiasing);
+ MODBIND1RC(TextServer::FontAntialiasing, font_get_antialiasing, const RID &);
- virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) override;
- virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const override;
+ MODBIND2(font_set_generate_mipmaps, const RID &, bool);
+ MODBIND1RC(bool, font_get_generate_mipmaps, const RID &);
- virtual void font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) override;
- virtual bool font_is_multichannel_signed_distance_field(const RID &p_font_rid) const override;
+ MODBIND2(font_set_multichannel_signed_distance_field, const RID &, bool);
+ MODBIND1RC(bool, font_is_multichannel_signed_distance_field, const RID &);
- virtual void font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) override;
- virtual int64_t font_get_msdf_pixel_range(const RID &p_font_rid) const override;
+ MODBIND2(font_set_msdf_pixel_range, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_msdf_pixel_range, const RID &);
- virtual void font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) override;
- virtual int64_t font_get_msdf_size(const RID &p_font_rid) const override;
+ MODBIND2(font_set_msdf_size, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_msdf_size, const RID &);
- virtual void font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) override;
- virtual int64_t font_get_fixed_size(const RID &p_font_rid) const override;
+ MODBIND2(font_set_fixed_size, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_fixed_size, const RID &);
- virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) override;
- virtual bool font_is_force_autohinter(const RID &p_font_rid) const override;
+ MODBIND2(font_set_force_autohinter, const RID &, bool);
+ MODBIND1RC(bool, font_is_force_autohinter, const RID &);
- virtual void font_set_subpixel_positioning(const RID &p_font_rid, SubpixelPositioning p_subpixel) override;
- virtual SubpixelPositioning font_get_subpixel_positioning(const RID &p_font_rid) const override;
+ MODBIND2(font_set_subpixel_positioning, const RID &, SubpixelPositioning);
+ MODBIND1RC(SubpixelPositioning, font_get_subpixel_positioning, const RID &);
- virtual void font_set_embolden(const RID &p_font_rid, double p_strength) override;
- virtual double font_get_embolden(const RID &p_font_rid) const override;
+ MODBIND2(font_set_embolden, const RID &, double);
+ MODBIND1RC(double, font_get_embolden, const RID &);
- virtual void font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) override;
- virtual Transform2D font_get_transform(const RID &p_font_rid) const override;
+ MODBIND2(font_set_transform, const RID &, const Transform2D &);
+ MODBIND1RC(Transform2D, font_get_transform, const RID &);
- virtual void font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) override;
- virtual Dictionary font_get_variation_coordinates(const RID &p_font_rid) const override;
+ MODBIND2(font_set_variation_coordinates, const RID &, const Dictionary &);
+ MODBIND1RC(Dictionary, font_get_variation_coordinates, const RID &);
- virtual void font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) override;
- virtual TextServer::Hinting font_get_hinting(const RID &p_font_rid) const override;
+ MODBIND2(font_set_hinting, const RID &, TextServer::Hinting);
+ MODBIND1RC(TextServer::Hinting, font_get_hinting, const RID &);
- virtual void font_set_oversampling(const RID &p_font_rid, double p_oversampling) override;
- virtual double font_get_oversampling(const RID &p_font_rid) const override;
+ MODBIND2(font_set_oversampling, const RID &, double);
+ MODBIND1RC(double, font_get_oversampling, const RID &);
- virtual TypedArray<Vector2i> font_get_size_cache_list(const RID &p_font_rid) const override;
- virtual void font_clear_size_cache(const RID &p_font_rid) override;
- virtual void font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) override;
+ MODBIND1RC(TypedArray<Vector2i>, font_get_size_cache_list, const RID &);
+ MODBIND1(font_clear_size_cache, const RID &);
+ MODBIND2(font_remove_size_cache, const RID &, const Vector2i &);
- virtual void font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) override;
- virtual double font_get_ascent(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_ascent, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_ascent, const RID &, int64_t);
- virtual void font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) override;
- virtual double font_get_descent(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_descent, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_descent, const RID &, int64_t);
- virtual void font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) override;
- virtual double font_get_underline_position(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_underline_position, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_underline_position, const RID &, int64_t);
- virtual void font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) override;
- virtual double font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_underline_thickness, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_underline_thickness, const RID &, int64_t);
- virtual void font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) override;
- virtual double font_get_scale(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_scale, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_scale, const RID &, int64_t);
- virtual int64_t font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const override;
- virtual void font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) override;
- virtual void font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) override;
+ MODBIND2RC(int64_t, font_get_texture_count, const RID &, const Vector2i &);
+ MODBIND2(font_clear_textures, const RID &, const Vector2i &);
+ MODBIND3(font_remove_texture, const RID &, const Vector2i &, int64_t);
- virtual void font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) override;
- virtual Ref<Image> font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
+ MODBIND4(font_set_texture_image, const RID &, const Vector2i &, int64_t, const Ref<Image> &);
+ MODBIND3RC(Ref<Image>, font_get_texture_image, const RID &, const Vector2i &, int64_t);
- virtual void font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) override;
- virtual PackedInt32Array font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
+ MODBIND4(font_set_texture_offsets, const RID &, const Vector2i &, int64_t, const PackedInt32Array &);
+ MODBIND3RC(PackedInt32Array, font_get_texture_offsets, const RID &, const Vector2i &, int64_t);
- virtual PackedInt32Array font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const override;
- virtual void font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) override;
- virtual void font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) override;
+ MODBIND2RC(PackedInt32Array, font_get_glyph_list, const RID &, const Vector2i &);
+ MODBIND2(font_clear_glyphs, const RID &, const Vector2i &);
+ MODBIND3(font_remove_glyph, const RID &, const Vector2i &, int64_t);
- virtual Vector2 font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) override;
+ MODBIND3RC(Vector2, font_get_glyph_advance, const RID &, int64_t, int64_t);
+ MODBIND4(font_set_glyph_advance, const RID &, int64_t, int64_t, const Vector2 &);
- virtual Vector2 font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) override;
+ MODBIND3RC(Vector2, font_get_glyph_offset, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_offset, const RID &, const Vector2i &, int64_t, const Vector2 &);
- virtual Vector2 font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) override;
+ MODBIND3RC(Vector2, font_get_glyph_size, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_size, const RID &, const Vector2i &, int64_t, const Vector2 &);
- virtual Rect2 font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) override;
+ MODBIND3RC(Rect2, font_get_glyph_uv_rect, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_uv_rect, const RID &, const Vector2i &, int64_t, const Rect2 &);
- virtual int64_t font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) override;
+ MODBIND3RC(int64_t, font_get_glyph_texture_idx, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_texture_idx, const RID &, const Vector2i &, int64_t, int64_t);
- virtual RID font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual Size2 font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
+ MODBIND3RC(RID, font_get_glyph_texture_rid, const RID &, const Vector2i &, int64_t);
+ MODBIND3RC(Size2, font_get_glyph_texture_size, const RID &, const Vector2i &, int64_t);
- virtual Dictionary font_get_glyph_contours(const RID &p_font, int64_t p_size, int64_t p_index) const override;
+ MODBIND3RC(Dictionary, font_get_glyph_contours, const RID &, int64_t, int64_t);
- virtual TypedArray<Vector2i> font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const override;
- virtual void font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) override;
- virtual void font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) override;
+ MODBIND2RC(TypedArray<Vector2i>, font_get_kerning_list, const RID &, int64_t);
+ MODBIND2(font_clear_kerning_map, const RID &, int64_t);
+ MODBIND3(font_remove_kerning, const RID &, int64_t, const Vector2i &);
- virtual void font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
- virtual Vector2 font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const override;
+ MODBIND4(font_set_kerning, const RID &, int64_t, const Vector2i &, const Vector2 &);
+ MODBIND3RC(Vector2, font_get_kerning, const RID &, int64_t, const Vector2i &);
- virtual int64_t font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector = 0) const override;
+ MODBIND4RC(int64_t, font_get_glyph_index, const RID &, int64_t, int64_t, int64_t);
- virtual bool font_has_char(const RID &p_font_rid, int64_t p_char) const override;
- virtual String font_get_supported_chars(const RID &p_font_rid) const override;
+ MODBIND2RC(bool, font_has_char, const RID &, int64_t);
+ MODBIND1RC(String, font_get_supported_chars, const RID &);
- virtual void font_render_range(const RID &p_font, const Vector2i &p_size, int64_t p_start, int64_t p_end) override;
- virtual void font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) override;
+ MODBIND4(font_render_range, const RID &, const Vector2i &, int64_t, int64_t);
+ MODBIND3(font_render_glyph, const RID &, const Vector2i &, int64_t);
- virtual void font_draw_glyph(const RID &p_font, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual void font_draw_glyph_outline(const RID &p_font, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ MODBIND6C(font_draw_glyph, const RID &, const RID &, int64_t, const Vector2 &, int64_t, const Color &);
+ MODBIND7C(font_draw_glyph_outline, const RID &, const RID &, int64_t, int64_t, const Vector2 &, int64_t, const Color &);
- virtual bool font_is_language_supported(const RID &p_font_rid, const String &p_language) const override;
- virtual void font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) override;
- virtual bool font_get_language_support_override(const RID &p_font_rid, const String &p_language) override;
- virtual void font_remove_language_support_override(const RID &p_font_rid, const String &p_language) override;
- virtual PackedStringArray font_get_language_support_overrides(const RID &p_font_rid) override;
+ MODBIND2RC(bool, font_is_language_supported, const RID &, const String &);
+ MODBIND3(font_set_language_support_override, const RID &, const String &, bool);
+ MODBIND2R(bool, font_get_language_support_override, const RID &, const String &);
+ MODBIND2(font_remove_language_support_override, const RID &, const String &);
+ MODBIND1R(PackedStringArray, font_get_language_support_overrides, const RID &);
- virtual bool font_is_script_supported(const RID &p_font_rid, const String &p_script) const override;
- virtual void font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) override;
- virtual bool font_get_script_support_override(const RID &p_font_rid, const String &p_script) override;
- virtual void font_remove_script_support_override(const RID &p_font_rid, const String &p_script) override;
- virtual PackedStringArray font_get_script_support_overrides(const RID &p_font_rid) override;
+ MODBIND2RC(bool, font_is_script_supported, const RID &, const String &);
+ MODBIND3(font_set_script_support_override, const RID &, const String &, bool);
+ MODBIND2R(bool, font_get_script_support_override, const RID &, const String &);
+ MODBIND2(font_remove_script_support_override, const RID &, const String &);
+ MODBIND1R(PackedStringArray, font_get_script_support_overrides, const RID &);
- virtual void font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) override;
- virtual Dictionary font_get_opentype_feature_overrides(const RID &p_font_rid) const override;
+ MODBIND2(font_set_opentype_feature_overrides, const RID &, const Dictionary &);
+ MODBIND1RC(Dictionary, font_get_opentype_feature_overrides, const RID &);
- virtual Dictionary font_supported_feature_list(const RID &p_font_rid) const override;
- virtual Dictionary font_supported_variation_list(const RID &p_font_rid) const override;
+ MODBIND1RC(Dictionary, font_supported_feature_list, const RID &);
+ MODBIND1RC(Dictionary, font_supported_variation_list, const RID &);
- virtual double font_get_global_oversampling() const override;
- virtual void font_set_global_oversampling(double p_oversampling) override;
+ MODBIND0RC(double, font_get_global_oversampling);
+ MODBIND1(font_set_global_oversampling, double);
/* Shaped text buffer interface */
- virtual RID create_shaped_text(Direction p_direction = DIRECTION_AUTO, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
+ MODBIND2R(RID, create_shaped_text, Direction, Orientation);
- virtual void shaped_text_clear(const RID &p_shaped) override;
+ MODBIND1(shaped_text_clear, const RID &);
- virtual void shaped_text_set_direction(const RID &p_shaped, Direction p_direction = DIRECTION_AUTO) override;
- virtual Direction shaped_text_get_direction(const RID &p_shaped) const override;
- virtual Direction shaped_text_get_inferred_direction(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_direction, const RID &, Direction);
+ MODBIND1RC(Direction, shaped_text_get_direction, const RID &);
+ MODBIND1RC(Direction, shaped_text_get_inferred_direction, const RID &);
- virtual void shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) override;
+ MODBIND2(shaped_text_set_bidi_override, const RID &, const Array &);
- virtual void shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) override;
- virtual String shaped_text_get_custom_punctuation(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_custom_punctuation, const RID &, const String &);
+ MODBIND1RC(String, shaped_text_get_custom_punctuation, const RID &);
- virtual void shaped_text_set_orientation(const RID &p_shaped, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
- virtual Orientation shaped_text_get_orientation(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_orientation, const RID &, Orientation);
+ MODBIND1RC(Orientation, shaped_text_get_orientation, const RID &);
- virtual void shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) override;
- virtual bool shaped_text_get_preserve_invalid(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_preserve_invalid, const RID &, bool);
+ MODBIND1RC(bool, shaped_text_get_preserve_invalid, const RID &);
- virtual void shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) override;
- virtual bool shaped_text_get_preserve_control(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_preserve_control, const RID &, bool);
+ MODBIND1RC(bool, shaped_text_get_preserve_control, const RID &);
- virtual void shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) override;
- virtual int64_t shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const override;
+ MODBIND3(shaped_text_set_spacing, const RID &, SpacingType, int64_t);
+ MODBIND2RC(int64_t, shaped_text_get_spacing, const RID &, SpacingType);
- virtual bool shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "", const Variant &p_meta = Variant()) override;
- virtual bool shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER, int64_t p_length = 1) override;
- virtual bool shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER) override;
+ MODBIND7R(bool, shaped_text_add_string, const RID &, const String &, const TypedArray<RID> &, int64_t, const Dictionary &, const String &, const Variant &);
+ MODBIND5R(bool, shaped_text_add_object, const RID &, const Variant &, const Size2 &, InlineAlignment, int64_t);
+ MODBIND4R(bool, shaped_text_resize_object, const RID &, const Variant &, const Size2 &, InlineAlignment);
- virtual int64_t shaped_get_span_count(const RID &p_shaped) const override;
- virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const override;
- virtual void shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary()) override;
+ MODBIND1RC(int64_t, shaped_get_span_count, const RID &);
+ MODBIND2RC(Variant, shaped_get_span_meta, const RID &, int64_t);
+ MODBIND5(shaped_set_span_update_font, const RID &, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &);
- virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const override;
- virtual RID shaped_text_get_parent(const RID &p_shaped) const override;
+ MODBIND3RC(RID, shaped_text_substr, const RID &, int64_t, int64_t);
+ MODBIND1RC(RID, shaped_text_get_parent, const RID &);
- virtual double shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
- virtual double shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) override;
+ MODBIND3R(double, shaped_text_fit_to_width, const RID &, double, BitField<TextServer::JustificationFlag>);
+ MODBIND2R(double, shaped_text_tab_align, const RID &, const PackedFloat32Array &);
- virtual bool shaped_text_shape(const RID &p_shaped) override;
- virtual bool shaped_text_update_breaks(const RID &p_shaped) override;
- virtual bool shaped_text_update_justification_ops(const RID &p_shaped) override;
+ MODBIND1R(bool, shaped_text_shape, const RID &);
+ MODBIND1R(bool, shaped_text_update_breaks, const RID &);
+ MODBIND1R(bool, shaped_text_update_justification_ops, const RID &);
- virtual int64_t shaped_text_get_trim_pos(const RID &p_shaped) const override;
- virtual int64_t shaped_text_get_ellipsis_pos(const RID &p_shaped) const override;
- virtual const Glyph *shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const override;
- virtual int64_t shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const override;
+ MODBIND1RC(int64_t, shaped_text_get_trim_pos, const RID &);
+ MODBIND1RC(int64_t, shaped_text_get_ellipsis_pos, const RID &);
+ MODBIND1RC(const Glyph *, shaped_text_get_ellipsis_glyphs, const RID &);
+ MODBIND1RC(int64_t, shaped_text_get_ellipsis_glyph_count, const RID &);
- virtual void shaped_text_overrun_trim_to_width(const RID &p_shaped, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) override;
+ MODBIND3(shaped_text_overrun_trim_to_width, const RID &, double, BitField<TextServer::TextOverrunFlag>);
- virtual bool shaped_text_is_ready(const RID &p_shaped) const override;
+ MODBIND1RC(bool, shaped_text_is_ready, const RID &);
- virtual const Glyph *shaped_text_get_glyphs(const RID &p_shaped) const override;
- virtual const Glyph *shaped_text_sort_logical(const RID &p_shaped) override;
- virtual int64_t shaped_text_get_glyph_count(const RID &p_shaped) const override;
+ MODBIND1RC(const Glyph *, shaped_text_get_glyphs, const RID &);
+ MODBIND1R(const Glyph *, shaped_text_sort_logical, const RID &);
+ MODBIND1RC(int64_t, shaped_text_get_glyph_count, const RID &);
- virtual Vector2i shaped_text_get_range(const RID &p_shaped) const override;
+ MODBIND1RC(Vector2i, shaped_text_get_range, const RID &);
- virtual Array shaped_text_get_objects(const RID &p_shaped) const override;
- virtual Rect2 shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const override;
+ MODBIND1RC(Array, shaped_text_get_objects, const RID &);
+ MODBIND2RC(Rect2, shaped_text_get_object_rect, const RID &, const Variant &);
- virtual Size2 shaped_text_get_size(const RID &p_shaped) const override;
- virtual double shaped_text_get_ascent(const RID &p_shaped) const override;
- virtual double shaped_text_get_descent(const RID &p_shaped) const override;
- virtual double shaped_text_get_width(const RID &p_shaped) const override;
- virtual double shaped_text_get_underline_position(const RID &p_shaped) const override;
- virtual double shaped_text_get_underline_thickness(const RID &p_shaped) const override;
+ MODBIND1RC(Size2, shaped_text_get_size, const RID &);
+ MODBIND1RC(double, shaped_text_get_ascent, const RID &);
+ MODBIND1RC(double, shaped_text_get_descent, const RID &);
+ MODBIND1RC(double, shaped_text_get_width, const RID &);
+ MODBIND1RC(double, shaped_text_get_underline_position, const RID &);
+ MODBIND1RC(double, shaped_text_get_underline_thickness, const RID &);
- virtual String format_number(const String &p_string, const String &p_language = "") const override;
- virtual String parse_number(const String &p_string, const String &p_language = "") const override;
- virtual String percent_sign(const String &p_language = "") const override;
+ MODBIND2RC(String, format_number, const String &, const String &);
+ MODBIND2RC(String, parse_number, const String &, const String &);
+ MODBIND1RC(String, percent_sign, const String &);
- virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "") const override;
+ MODBIND2RC(PackedInt32Array, string_get_word_breaks, const String &, const String &);
- virtual int64_t is_confusable(const String &p_string, const PackedStringArray &p_dict) const override;
- virtual bool spoof_check(const String &p_string) const override;
+ MODBIND2RC(int64_t, is_confusable, const String &, const PackedStringArray &);
+ MODBIND1RC(bool, spoof_check, const String &);
- virtual String strip_diacritics(const String &p_string) const override;
- virtual bool is_valid_identifier(const String &p_string) const override;
+ MODBIND1RC(String, strip_diacritics, const String &);
+ MODBIND1RC(bool, is_valid_identifier, const String &);
- virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
- virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
+ MODBIND2RC(String, string_to_upper, const String &, const String &);
+ MODBIND2RC(String, string_to_lower, const String &, const String &);
TextServerAdvanced();
~TextServerAdvanced();
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index 9ef0f0ad82..e7cb1b28a8 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -33,7 +33,7 @@
#ifdef GDEXTENSION
// Headers for building as GDExtension plug-in.
-#include <godot_cpp/classes/file.hpp>
+#include <godot_cpp/classes/file_access.hpp>
#include <godot_cpp/classes/project_settings.hpp>
#include <godot_cpp/classes/rendering_server.hpp>
#include <godot_cpp/classes/translation_server.hpp>
@@ -66,7 +66,7 @@ using namespace godot;
#define OT_TAG(c1, c2, c3, c4) ((int32_t)((((uint32_t)(c1)&0xff) << 24) | (((uint32_t)(c2)&0xff) << 16) | (((uint32_t)(c3)&0xff) << 8) | ((uint32_t)(c4)&0xff)))
-bool TextServerFallback::has_feature(Feature p_feature) const {
+bool TextServerFallback::_has_feature(Feature p_feature) const {
switch (p_feature) {
case FEATURE_SIMPLE_LAYOUT:
case FEATURE_FONT_BITMAP:
@@ -83,7 +83,7 @@ bool TextServerFallback::has_feature(Feature p_feature) const {
return false;
}
-String TextServerFallback::get_name() const {
+String TextServerFallback::_get_name() const {
#ifdef GDEXTENSION
return "Fallback (GDExtension)";
#else
@@ -91,7 +91,7 @@ String TextServerFallback::get_name() const {
#endif
}
-int64_t TextServerFallback::get_features() const {
+int64_t TextServerFallback::_get_features() const {
int64_t interface_features = FEATURE_SIMPLE_LAYOUT | FEATURE_FONT_BITMAP;
#ifdef MODULE_FREETYPE_ENABLED
interface_features |= FEATURE_FONT_DYNAMIC;
@@ -103,7 +103,7 @@ int64_t TextServerFallback::get_features() const {
return interface_features;
}
-void TextServerFallback::free_rid(const RID &p_rid) {
+void TextServerFallback::_free_rid(const RID &p_rid) {
_THREAD_SAFE_METHOD_
if (font_owner.owns(p_rid)) {
FontFallback *fd = font_owner.get_or_null(p_rid);
@@ -116,20 +116,28 @@ void TextServerFallback::free_rid(const RID &p_rid) {
}
}
-bool TextServerFallback::has(const RID &p_rid) {
+bool TextServerFallback::_has(const RID &p_rid) {
_THREAD_SAFE_METHOD_
return font_owner.owns(p_rid) || shaped_owner.owns(p_rid);
}
-bool TextServerFallback::load_support_data(const String &p_filename) {
+String TextServerFallback::_get_support_data_filename() const {
+ return "";
+};
+
+String TextServerFallback::_get_support_data_info() const {
+ return "Not supported";
+};
+
+bool TextServerFallback::_load_support_data(const String &p_filename) {
return false; // No extra data used.
}
-bool TextServerFallback::save_support_data(const String &p_filename) const {
+bool TextServerFallback::_save_support_data(const String &p_filename) const {
return false; // No extra data used.
}
-bool TextServerFallback::is_locale_right_to_left(const String &p_locale) const {
+bool TextServerFallback::_is_locale_right_to_left(const String &p_locale) const {
return false; // No RTL support.
}
@@ -169,7 +177,7 @@ _FORCE_INLINE_ int32_t ot_tag_from_string(const char *p_str, int p_len) {
return OT_TAG(tag[0], tag[1], tag[2], tag[3]);
}
-int64_t TextServerFallback::name_to_tag(const String &p_name) const {
+int64_t TextServerFallback::_name_to_tag(const String &p_name) const {
if (feature_sets.has(p_name)) {
return feature_sets[p_name];
}
@@ -185,7 +193,7 @@ _FORCE_INLINE_ void ot_tag_to_string(int32_t p_tag, char *p_buf) {
p_buf[3] = (char)(uint8_t)(p_tag >> 0);
}
-String TextServerFallback::tag_to_name(int64_t p_tag) const {
+String TextServerFallback::_tag_to_name(int64_t p_tag) const {
if (feature_sets_inv.has(p_tag)) {
return feature_sets_inv[p_tag];
}
@@ -467,8 +475,14 @@ _FORCE_INLINE_ TextServerFallback::FontGlyph TextServerFallback::rasterize_msdf(
td.projection = &projection;
td.distancePixelConversion = &distancePixelConversion;
+#ifdef GDEXTENSION
+ for (int i = 0; i < h; i++) {
+ _generateMTSDF_threaded(i, &td);
+ }
+#else
WorkerThreadPool::GroupID group_id = WorkerThreadPool::get_singleton()->add_template_group_task(this, &TextServerFallback::_generateMTSDF_threaded, &td, h, -1, true, SNAME("TextServerFBRenderMSDF"));
WorkerThreadPool::get_singleton()->wait_for_group_task_completion(group_id);
+#endif
msdfgen::msdfErrorCorrection(image, shape, projection, p_pixel_range, config);
@@ -840,7 +854,7 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontFallback *p_f
fd->oversampling = 1.0;
fd->size.x = p_font_data->msdf_source_size;
} else if (p_font_data->oversampling <= 0.0) {
- fd->oversampling = font_get_global_oversampling();
+ fd->oversampling = _font_get_global_oversampling();
} else {
fd->oversampling = p_font_data->oversampling;
}
@@ -921,8 +935,8 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontFallback *p_f
coords.write[i] = CLAMP(var_value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum);
}
- if (p_font_data->variation_coordinates.has(tag_to_name(var_tag))) {
- var_value = p_font_data->variation_coordinates[tag_to_name(var_tag)];
+ if (p_font_data->variation_coordinates.has(_tag_to_name(var_tag))) {
+ var_value = p_font_data->variation_coordinates[_tag_to_name(var_tag)];
coords.write[i] = CLAMP(var_value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum);
}
}
@@ -948,7 +962,7 @@ _FORCE_INLINE_ void TextServerFallback::_font_clear_cache(FontFallback *p_font_d
p_font_data->supported_varaitions.clear();
}
-RID TextServerFallback::create_font() {
+RID TextServerFallback::_create_font() {
_THREAD_SAFE_METHOD_
FontFallback *fd = memnew(FontFallback);
@@ -956,7 +970,7 @@ RID TextServerFallback::create_font() {
return font_owner.make_rid(fd);
}
-void TextServerFallback::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
+void TextServerFallback::_font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -967,7 +981,7 @@ void TextServerFallback::font_set_data(const RID &p_font_rid, const PackedByteAr
fd->data_size = fd->data.size();
}
-void TextServerFallback::font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {
+void TextServerFallback::_font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -978,7 +992,7 @@ void TextServerFallback::font_set_data_ptr(const RID &p_font_rid, const uint8_t
fd->data_size = p_data_size;
}
-void TextServerFallback::font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) {
+void TextServerFallback::_font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -988,7 +1002,7 @@ void TextServerFallback::font_set_style(const RID &p_font_rid, BitField<FontStyl
fd->style_flags = p_style;
}
-void TextServerFallback::font_set_face_index(const RID &p_font_rid, int64_t p_face_index) {
+void TextServerFallback::_font_set_face_index(const RID &p_font_rid, int64_t p_face_index) {
ERR_FAIL_COND(p_face_index < 0);
ERR_FAIL_COND(p_face_index >= 0x7FFF);
@@ -1002,7 +1016,7 @@ void TextServerFallback::font_set_face_index(const RID &p_font_rid, int64_t p_fa
}
}
-int64_t TextServerFallback::font_get_face_index(const RID &p_font_rid) const {
+int64_t TextServerFallback::_font_get_face_index(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1010,7 +1024,7 @@ int64_t TextServerFallback::font_get_face_index(const RID &p_font_rid) const {
return fd->face_index;
}
-int64_t TextServerFallback::font_get_face_count(const RID &p_font_rid) const {
+int64_t TextServerFallback::_font_get_face_count(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1051,7 +1065,7 @@ int64_t TextServerFallback::font_get_face_count(const RID &p_font_rid) const {
return face_count;
}
-BitField<TextServer::FontStyle> TextServerFallback::font_get_style(const RID &p_font_rid) const {
+BitField<TextServer::FontStyle> TextServerFallback::_font_get_style(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1061,7 +1075,7 @@ BitField<TextServer::FontStyle> TextServerFallback::font_get_style(const RID &p_
return fd->style_flags;
}
-void TextServerFallback::font_set_style_name(const RID &p_font_rid, const String &p_name) {
+void TextServerFallback::_font_set_style_name(const RID &p_font_rid, const String &p_name) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1071,7 +1085,7 @@ void TextServerFallback::font_set_style_name(const RID &p_font_rid, const String
fd->style_name = p_name;
}
-String TextServerFallback::font_get_style_name(const RID &p_font_rid) const {
+String TextServerFallback::_font_get_style_name(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
@@ -1081,7 +1095,7 @@ String TextServerFallback::font_get_style_name(const RID &p_font_rid) const {
return fd->style_name;
}
-void TextServerFallback::font_set_name(const RID &p_font_rid, const String &p_name) {
+void TextServerFallback::_font_set_name(const RID &p_font_rid, const String &p_name) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1091,7 +1105,7 @@ void TextServerFallback::font_set_name(const RID &p_font_rid, const String &p_na
fd->font_name = p_name;
}
-String TextServerFallback::font_get_name(const RID &p_font_rid) const {
+String TextServerFallback::_font_get_name(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
@@ -1101,7 +1115,7 @@ String TextServerFallback::font_get_name(const RID &p_font_rid) const {
return fd->font_name;
}
-void TextServerFallback::font_set_antialiasing(RID p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
+void TextServerFallback::_font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1112,7 +1126,7 @@ void TextServerFallback::font_set_antialiasing(RID p_font_rid, TextServer::FontA
}
}
-TextServer::FontAntialiasing TextServerFallback::font_get_antialiasing(RID p_font_rid) const {
+TextServer::FontAntialiasing TextServerFallback::_font_get_antialiasing(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, TextServer::FONT_ANTIALIASING_NONE);
@@ -1120,7 +1134,7 @@ TextServer::FontAntialiasing TextServerFallback::font_get_antialiasing(RID p_fon
return fd->antialiasing;
}
-void TextServerFallback::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
+void TextServerFallback::_font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1135,7 +1149,7 @@ void TextServerFallback::font_set_generate_mipmaps(const RID &p_font_rid, bool p
}
}
-bool TextServerFallback::font_get_generate_mipmaps(const RID &p_font_rid) const {
+bool TextServerFallback::_font_get_generate_mipmaps(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -1143,7 +1157,7 @@ bool TextServerFallback::font_get_generate_mipmaps(const RID &p_font_rid) const
return fd->mipmaps;
}
-void TextServerFallback::font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {
+void TextServerFallback::_font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1154,7 +1168,7 @@ void TextServerFallback::font_set_multichannel_signed_distance_field(const RID &
}
}
-bool TextServerFallback::font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {
+bool TextServerFallback::_font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -1162,7 +1176,7 @@ bool TextServerFallback::font_is_multichannel_signed_distance_field(const RID &p
return fd->msdf;
}
-void TextServerFallback::font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {
+void TextServerFallback::_font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1173,7 +1187,7 @@ void TextServerFallback::font_set_msdf_pixel_range(const RID &p_font_rid, int64_
}
}
-int64_t TextServerFallback::font_get_msdf_pixel_range(const RID &p_font_rid) const {
+int64_t TextServerFallback::_font_get_msdf_pixel_range(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -1181,7 +1195,7 @@ int64_t TextServerFallback::font_get_msdf_pixel_range(const RID &p_font_rid) con
return fd->msdf_range;
}
-void TextServerFallback::font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {
+void TextServerFallback::_font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1192,7 +1206,7 @@ void TextServerFallback::font_set_msdf_size(const RID &p_font_rid, int64_t p_msd
}
}
-int64_t TextServerFallback::font_get_msdf_size(const RID &p_font_rid) const {
+int64_t TextServerFallback::_font_get_msdf_size(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -1200,7 +1214,7 @@ int64_t TextServerFallback::font_get_msdf_size(const RID &p_font_rid) const {
return fd->msdf_source_size;
}
-void TextServerFallback::font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {
+void TextServerFallback::_font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1208,7 +1222,7 @@ void TextServerFallback::font_set_fixed_size(const RID &p_font_rid, int64_t p_fi
fd->fixed_size = p_fixed_size;
}
-int64_t TextServerFallback::font_get_fixed_size(const RID &p_font_rid) const {
+int64_t TextServerFallback::_font_get_fixed_size(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -1216,7 +1230,7 @@ int64_t TextServerFallback::font_get_fixed_size(const RID &p_font_rid) const {
return fd->fixed_size;
}
-void TextServerFallback::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
+void TextServerFallback::_font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1227,7 +1241,7 @@ void TextServerFallback::font_set_force_autohinter(const RID &p_font_rid, bool p
}
}
-bool TextServerFallback::font_is_force_autohinter(const RID &p_font_rid) const {
+bool TextServerFallback::_font_is_force_autohinter(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -1235,7 +1249,7 @@ bool TextServerFallback::font_is_force_autohinter(const RID &p_font_rid) const {
return fd->force_autohinter;
}
-void TextServerFallback::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
+void TextServerFallback::_font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1246,7 +1260,7 @@ void TextServerFallback::font_set_hinting(const RID &p_font_rid, TextServer::Hin
}
}
-TextServer::Hinting TextServerFallback::font_get_hinting(const RID &p_font_rid) const {
+TextServer::Hinting TextServerFallback::_font_get_hinting(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, HINTING_NONE);
@@ -1254,7 +1268,7 @@ TextServer::Hinting TextServerFallback::font_get_hinting(const RID &p_font_rid)
return fd->hinting;
}
-void TextServerFallback::font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {
+void TextServerFallback::_font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1262,7 +1276,7 @@ void TextServerFallback::font_set_subpixel_positioning(const RID &p_font_rid, Te
fd->subpixel_positioning = p_subpixel;
}
-TextServer::SubpixelPositioning TextServerFallback::font_get_subpixel_positioning(const RID &p_font_rid) const {
+TextServer::SubpixelPositioning TextServerFallback::_font_get_subpixel_positioning(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, SUBPIXEL_POSITIONING_DISABLED);
@@ -1270,7 +1284,7 @@ TextServer::SubpixelPositioning TextServerFallback::font_get_subpixel_positionin
return fd->subpixel_positioning;
}
-void TextServerFallback::font_set_embolden(const RID &p_font_rid, double p_strength) {
+void TextServerFallback::_font_set_embolden(const RID &p_font_rid, double p_strength) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1281,7 +1295,7 @@ void TextServerFallback::font_set_embolden(const RID &p_font_rid, double p_stren
}
}
-double TextServerFallback::font_get_embolden(const RID &p_font_rid) const {
+double TextServerFallback::_font_get_embolden(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1289,7 +1303,7 @@ double TextServerFallback::font_get_embolden(const RID &p_font_rid) const {
return fd->embolden;
}
-void TextServerFallback::font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
+void TextServerFallback::_font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1300,7 +1314,7 @@ void TextServerFallback::font_set_transform(const RID &p_font_rid, const Transfo
}
}
-Transform2D TextServerFallback::font_get_transform(const RID &p_font_rid) const {
+Transform2D TextServerFallback::_font_get_transform(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Transform2D());
@@ -1308,7 +1322,7 @@ Transform2D TextServerFallback::font_get_transform(const RID &p_font_rid) const
return fd->transform;
}
-void TextServerFallback::font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {
+void TextServerFallback::_font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1319,7 +1333,7 @@ void TextServerFallback::font_set_variation_coordinates(const RID &p_font_rid, c
}
}
-Dictionary TextServerFallback::font_get_variation_coordinates(const RID &p_font_rid) const {
+Dictionary TextServerFallback::_font_get_variation_coordinates(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -1327,7 +1341,7 @@ Dictionary TextServerFallback::font_get_variation_coordinates(const RID &p_font_
return fd->variation_coordinates;
}
-void TextServerFallback::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
+void TextServerFallback::_font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1338,7 +1352,7 @@ void TextServerFallback::font_set_oversampling(const RID &p_font_rid, double p_o
}
}
-double TextServerFallback::font_get_oversampling(const RID &p_font_rid) const {
+double TextServerFallback::_font_get_oversampling(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1346,7 +1360,7 @@ double TextServerFallback::font_get_oversampling(const RID &p_font_rid) const {
return fd->oversampling;
}
-TypedArray<Vector2i> TextServerFallback::font_get_size_cache_list(const RID &p_font_rid) const {
+TypedArray<Vector2i> TextServerFallback::_font_get_size_cache_list(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, TypedArray<Vector2i>());
@@ -1358,7 +1372,7 @@ TypedArray<Vector2i> TextServerFallback::font_get_size_cache_list(const RID &p_f
return ret;
}
-void TextServerFallback::font_clear_size_cache(const RID &p_font_rid) {
+void TextServerFallback::_font_clear_size_cache(const RID &p_font_rid) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1369,7 +1383,7 @@ void TextServerFallback::font_clear_size_cache(const RID &p_font_rid) {
fd->cache.clear();
}
-void TextServerFallback::font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {
+void TextServerFallback::_font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1380,7 +1394,7 @@ void TextServerFallback::font_remove_size_cache(const RID &p_font_rid, const Vec
}
}
-void TextServerFallback::font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {
+void TextServerFallback::_font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1391,7 +1405,7 @@ void TextServerFallback::font_set_ascent(const RID &p_font_rid, int64_t p_size,
fd->cache[size]->ascent = p_ascent;
}
-double TextServerFallback::font_get_ascent(const RID &p_font_rid, int64_t p_size) const {
+double TextServerFallback::_font_get_ascent(const RID &p_font_rid, int64_t p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1407,7 +1421,7 @@ double TextServerFallback::font_get_ascent(const RID &p_font_rid, int64_t p_size
}
}
-void TextServerFallback::font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {
+void TextServerFallback::_font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1417,7 +1431,7 @@ void TextServerFallback::font_set_descent(const RID &p_font_rid, int64_t p_size,
fd->cache[size]->descent = p_descent;
}
-double TextServerFallback::font_get_descent(const RID &p_font_rid, int64_t p_size) const {
+double TextServerFallback::_font_get_descent(const RID &p_font_rid, int64_t p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1433,7 +1447,7 @@ double TextServerFallback::font_get_descent(const RID &p_font_rid, int64_t p_siz
}
}
-void TextServerFallback::font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {
+void TextServerFallback::_font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1444,7 +1458,7 @@ void TextServerFallback::font_set_underline_position(const RID &p_font_rid, int6
fd->cache[size]->underline_position = p_underline_position;
}
-double TextServerFallback::font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {
+double TextServerFallback::_font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1460,7 +1474,7 @@ double TextServerFallback::font_get_underline_position(const RID &p_font_rid, in
}
}
-void TextServerFallback::font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {
+void TextServerFallback::_font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1471,7 +1485,7 @@ void TextServerFallback::font_set_underline_thickness(const RID &p_font_rid, int
fd->cache[size]->underline_thickness = p_underline_thickness;
}
-double TextServerFallback::font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {
+double TextServerFallback::_font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1487,7 +1501,7 @@ double TextServerFallback::font_get_underline_thickness(const RID &p_font_rid, i
}
}
-void TextServerFallback::font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {
+void TextServerFallback::_font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1503,7 +1517,7 @@ void TextServerFallback::font_set_scale(const RID &p_font_rid, int64_t p_size, d
fd->cache[size]->scale = p_scale;
}
-double TextServerFallback::font_get_scale(const RID &p_font_rid, int64_t p_size) const {
+double TextServerFallback::_font_get_scale(const RID &p_font_rid, int64_t p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.0);
@@ -1519,7 +1533,7 @@ double TextServerFallback::font_get_scale(const RID &p_font_rid, int64_t p_size)
}
}
-int64_t TextServerFallback::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
+int64_t TextServerFallback::_font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
@@ -1531,7 +1545,7 @@ int64_t TextServerFallback::font_get_texture_count(const RID &p_font_rid, const
return fd->cache[size]->textures.size();
}
-void TextServerFallback::font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {
+void TextServerFallback::_font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
MutexLock lock(fd->mutex);
@@ -1541,7 +1555,7 @@ void TextServerFallback::font_clear_textures(const RID &p_font_rid, const Vector
fd->cache[size]->textures.clear();
}
-void TextServerFallback::font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {
+void TextServerFallback::_font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1553,7 +1567,7 @@ void TextServerFallback::font_remove_texture(const RID &p_font_rid, const Vector
fd->cache[size]->textures.remove_at(p_texture_index);
}
-void TextServerFallback::font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {
+void TextServerFallback::_font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
ERR_FAIL_COND(p_image.is_null());
@@ -1584,7 +1598,7 @@ void TextServerFallback::font_set_texture_image(const RID &p_font_rid, const Vec
tex.dirty = false;
}
-Ref<Image> TextServerFallback::font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
+Ref<Image> TextServerFallback::_font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Ref<Image>());
@@ -1601,7 +1615,7 @@ Ref<Image> TextServerFallback::font_get_texture_image(const RID &p_font_rid, con
return img;
}
-void TextServerFallback::font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {
+void TextServerFallback::_font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1617,7 +1631,7 @@ void TextServerFallback::font_set_texture_offsets(const RID &p_font_rid, const V
tex.offsets = p_offset;
}
-PackedInt32Array TextServerFallback::font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
+PackedInt32Array TextServerFallback::_font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedInt32Array());
@@ -1630,7 +1644,7 @@ PackedInt32Array TextServerFallback::font_get_texture_offsets(const RID &p_font_
return tex.offsets;
}
-PackedInt32Array TextServerFallback::font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {
+PackedInt32Array TextServerFallback::_font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedInt32Array());
@@ -1646,7 +1660,7 @@ PackedInt32Array TextServerFallback::font_get_glyph_list(const RID &p_font_rid,
return ret;
}
-void TextServerFallback::font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {
+void TextServerFallback::_font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1657,7 +1671,7 @@ void TextServerFallback::font_clear_glyphs(const RID &p_font_rid, const Vector2i
fd->cache[size]->glyph_map.clear();
}
-void TextServerFallback::font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {
+void TextServerFallback::_font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1668,7 +1682,7 @@ void TextServerFallback::font_remove_glyph(const RID &p_font_rid, const Vector2i
fd->cache[size]->glyph_map.erase(p_glyph);
}
-Vector2 TextServerFallback::font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {
+Vector2 TextServerFallback::_font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -1679,7 +1693,7 @@ Vector2 TextServerFallback::font_get_glyph_advance(const RID &p_font_rid, int64_
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1705,7 +1719,7 @@ Vector2 TextServerFallback::font_get_glyph_advance(const RID &p_font_rid, int64_
}
}
-void TextServerFallback::font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {
+void TextServerFallback::_font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1720,7 +1734,7 @@ void TextServerFallback::font_set_glyph_advance(const RID &p_font_rid, int64_t p
gl[p_glyph].found = true;
}
-Vector2 TextServerFallback::font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Vector2 TextServerFallback::_font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -1731,7 +1745,7 @@ Vector2 TextServerFallback::font_get_glyph_offset(const RID &p_font_rid, const V
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1750,7 +1764,7 @@ Vector2 TextServerFallback::font_get_glyph_offset(const RID &p_font_rid, const V
}
}
-void TextServerFallback::font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {
+void TextServerFallback::_font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1765,7 +1779,7 @@ void TextServerFallback::font_set_glyph_offset(const RID &p_font_rid, const Vect
gl[p_glyph].found = true;
}
-Vector2 TextServerFallback::font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Vector2 TextServerFallback::_font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -1776,7 +1790,7 @@ Vector2 TextServerFallback::font_get_glyph_size(const RID &p_font_rid, const Vec
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1795,7 +1809,7 @@ Vector2 TextServerFallback::font_get_glyph_size(const RID &p_font_rid, const Vec
}
}
-void TextServerFallback::font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {
+void TextServerFallback::_font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1810,7 +1824,7 @@ void TextServerFallback::font_set_glyph_size(const RID &p_font_rid, const Vector
gl[p_glyph].found = true;
}
-Rect2 TextServerFallback::font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Rect2 TextServerFallback::_font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Rect2());
@@ -1821,7 +1835,7 @@ Rect2 TextServerFallback::font_get_glyph_uv_rect(const RID &p_font_rid, const Ve
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1835,7 +1849,7 @@ Rect2 TextServerFallback::font_get_glyph_uv_rect(const RID &p_font_rid, const Ve
return gl[p_glyph | mod].uv_rect;
}
-void TextServerFallback::font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {
+void TextServerFallback::_font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1850,7 +1864,7 @@ void TextServerFallback::font_set_glyph_uv_rect(const RID &p_font_rid, const Vec
gl[p_glyph].found = true;
}
-int64_t TextServerFallback::font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+int64_t TextServerFallback::_font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, -1);
@@ -1861,7 +1875,7 @@ int64_t TextServerFallback::font_get_glyph_texture_idx(const RID &p_font_rid, co
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1875,7 +1889,7 @@ int64_t TextServerFallback::font_get_glyph_texture_idx(const RID &p_font_rid, co
return gl[p_glyph | mod].texture_idx;
}
-void TextServerFallback::font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {
+void TextServerFallback::_font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -1890,7 +1904,7 @@ void TextServerFallback::font_set_glyph_texture_idx(const RID &p_font_rid, const
gl[p_glyph].found = true;
}
-RID TextServerFallback::font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+RID TextServerFallback::_font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, RID());
@@ -1901,7 +1915,7 @@ RID TextServerFallback::font_get_glyph_texture_rid(const RID &p_font_rid, const
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1938,7 +1952,7 @@ RID TextServerFallback::font_get_glyph_texture_rid(const RID &p_font_rid, const
return RID();
}
-Size2 TextServerFallback::font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
+Size2 TextServerFallback::_font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Size2());
@@ -1949,7 +1963,7 @@ Size2 TextServerFallback::font_get_glyph_texture_size(const RID &p_font_rid, con
int mod = 0;
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
mod = (layout << 24);
}
@@ -1986,7 +2000,7 @@ Size2 TextServerFallback::font_get_glyph_texture_size(const RID &p_font_rid, con
return Size2();
}
-Dictionary TextServerFallback::font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {
+Dictionary TextServerFallback::_font_get_glyph_contours(const RID &p_font_rid, int64_t p_size, int64_t p_index) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -2036,7 +2050,7 @@ Dictionary TextServerFallback::font_get_glyph_contours(const RID &p_font_rid, in
#endif
}
-TypedArray<Vector2i> TextServerFallback::font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {
+TypedArray<Vector2i> TextServerFallback::_font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, TypedArray<Vector2i>());
@@ -2052,7 +2066,7 @@ TypedArray<Vector2i> TextServerFallback::font_get_kerning_list(const RID &p_font
return ret;
}
-void TextServerFallback::font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {
+void TextServerFallback::_font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2063,7 +2077,7 @@ void TextServerFallback::font_clear_kerning_map(const RID &p_font_rid, int64_t p
fd->cache[size]->kerning_map.clear();
}
-void TextServerFallback::font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {
+void TextServerFallback::_font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2074,7 +2088,7 @@ void TextServerFallback::font_remove_kerning(const RID &p_font_rid, int64_t p_si
fd->cache[size]->kerning_map.erase(p_glyph_pair);
}
-void TextServerFallback::font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
+void TextServerFallback::_font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2085,7 +2099,7 @@ void TextServerFallback::font_set_kerning(const RID &p_font_rid, int64_t p_size,
fd->cache[size]->kerning_map[p_glyph_pair] = p_kerning;
}
-Vector2 TextServerFallback::font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {
+Vector2 TextServerFallback::_font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector2());
@@ -2120,12 +2134,12 @@ Vector2 TextServerFallback::font_get_kerning(const RID &p_font_rid, int64_t p_si
return Vector2();
}
-int64_t TextServerFallback::font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector) const {
+int64_t TextServerFallback::_font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector) const {
ERR_FAIL_COND_V_MSG((p_char >= 0xd800 && p_char <= 0xdfff) || (p_char > 0x10ffff), 0, "Unicode parsing error: Invalid unicode codepoint " + String::num_int64(p_char, 16) + ".");
return (int64_t)p_char;
}
-bool TextServerFallback::font_has_char(const RID &p_font_rid, int64_t p_char) const {
+bool TextServerFallback::_font_has_char(const RID &p_font_rid, int64_t p_char) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V_MSG((p_char >= 0xd800 && p_char <= 0xdfff) || (p_char > 0x10ffff), false, "Unicode parsing error: Invalid unicode codepoint " + String::num_int64(p_char, 16) + ".");
if (!fd) {
@@ -2146,7 +2160,7 @@ bool TextServerFallback::font_has_char(const RID &p_font_rid, int64_t p_char) co
return (at_size) ? at_size->glyph_map.has((int32_t)p_char) : false;
}
-String TextServerFallback::font_get_supported_chars(const RID &p_font_rid) const {
+String TextServerFallback::_font_get_supported_chars(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
@@ -2179,7 +2193,7 @@ String TextServerFallback::font_get_supported_chars(const RID &p_font_rid) const
return chars;
}
-void TextServerFallback::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
+void TextServerFallback::_font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
ERR_FAIL_COND_MSG((p_start >= 0xd800 && p_start <= 0xdfff) || (p_start > 0x10ffff), "Unicode parsing error: Invalid unicode codepoint " + String::num_int64(p_start, 16) + ".");
@@ -2214,7 +2228,7 @@ void TextServerFallback::font_render_range(const RID &p_font_rid, const Vector2i
}
}
-void TextServerFallback::font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {
+void TextServerFallback::_font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2245,7 +2259,7 @@ void TextServerFallback::font_render_glyph(const RID &p_font_rid, const Vector2i
#endif
}
-void TextServerFallback::font_draw_glyph(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
+void TextServerFallback::_font_draw_glyph(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2260,7 +2274,7 @@ void TextServerFallback::font_draw_glyph(const RID &p_font_rid, const RID &p_can
if (!fd->msdf && fd->cache[size]->face) {
// LCD layout, bits 24, 25, 26
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
lcd_aa = true;
index = index | (layout << 24);
@@ -2337,7 +2351,7 @@ void TextServerFallback::font_draw_glyph(const RID &p_font_rid, const RID &p_can
}
}
-void TextServerFallback::font_draw_glyph_outline(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
+void TextServerFallback::_font_draw_glyph_outline(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2352,7 +2366,7 @@ void TextServerFallback::font_draw_glyph_outline(const RID &p_font_rid, const RI
if (!fd->msdf && fd->cache[size]->face) {
// LCD layout, bits 24, 25, 26
if (fd->antialiasing == FONT_ANTIALIASING_LCD) {
- TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)GLOBAL_GET("gui/theme/lcd_subpixel_layout");
+ TextServer::FontLCDSubpixelLayout layout = (TextServer::FontLCDSubpixelLayout)(int)ProjectSettings::get_singleton()->get("gui/theme/lcd_subpixel_layout");
if (layout != FONT_LCD_SUBPIXEL_LAYOUT_NONE) {
lcd_aa = true;
index = index | (layout << 24);
@@ -2429,7 +2443,7 @@ void TextServerFallback::font_draw_glyph_outline(const RID &p_font_rid, const RI
}
}
-bool TextServerFallback::font_is_language_supported(const RID &p_font_rid, const String &p_language) const {
+bool TextServerFallback::_font_is_language_supported(const RID &p_font_rid, const String &p_language) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2441,7 +2455,7 @@ bool TextServerFallback::font_is_language_supported(const RID &p_font_rid, const
}
}
-void TextServerFallback::font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {
+void TextServerFallback::_font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2449,7 +2463,7 @@ void TextServerFallback::font_set_language_support_override(const RID &p_font_ri
fd->language_support_overrides[p_language] = p_supported;
}
-bool TextServerFallback::font_get_language_support_override(const RID &p_font_rid, const String &p_language) {
+bool TextServerFallback::_font_get_language_support_override(const RID &p_font_rid, const String &p_language) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2457,7 +2471,7 @@ bool TextServerFallback::font_get_language_support_override(const RID &p_font_ri
return fd->language_support_overrides[p_language];
}
-void TextServerFallback::font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {
+void TextServerFallback::_font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2465,7 +2479,7 @@ void TextServerFallback::font_remove_language_support_override(const RID &p_font
fd->language_support_overrides.erase(p_language);
}
-PackedStringArray TextServerFallback::font_get_language_support_overrides(const RID &p_font_rid) {
+PackedStringArray TextServerFallback::_font_get_language_support_overrides(const RID &p_font_rid) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedStringArray());
@@ -2477,7 +2491,7 @@ PackedStringArray TextServerFallback::font_get_language_support_overrides(const
return out;
}
-bool TextServerFallback::font_is_script_supported(const RID &p_font_rid, const String &p_script) const {
+bool TextServerFallback::_font_is_script_supported(const RID &p_font_rid, const String &p_script) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2489,7 +2503,7 @@ bool TextServerFallback::font_is_script_supported(const RID &p_font_rid, const S
}
}
-void TextServerFallback::font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {
+void TextServerFallback::_font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2497,7 +2511,7 @@ void TextServerFallback::font_set_script_support_override(const RID &p_font_rid,
fd->script_support_overrides[p_script] = p_supported;
}
-bool TextServerFallback::font_get_script_support_override(const RID &p_font_rid, const String &p_script) {
+bool TextServerFallback::_font_get_script_support_override(const RID &p_font_rid, const String &p_script) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
@@ -2505,7 +2519,7 @@ bool TextServerFallback::font_get_script_support_override(const RID &p_font_rid,
return fd->script_support_overrides[p_script];
}
-void TextServerFallback::font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {
+void TextServerFallback::_font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2515,7 +2529,7 @@ void TextServerFallback::font_remove_script_support_override(const RID &p_font_r
fd->script_support_overrides.erase(p_script);
}
-PackedStringArray TextServerFallback::font_get_script_support_overrides(const RID &p_font_rid) {
+PackedStringArray TextServerFallback::_font_get_script_support_overrides(const RID &p_font_rid) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, PackedStringArray());
@@ -2527,7 +2541,7 @@ PackedStringArray TextServerFallback::font_get_script_support_overrides(const RI
return out;
}
-void TextServerFallback::font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {
+void TextServerFallback::_font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
@@ -2537,7 +2551,7 @@ void TextServerFallback::font_set_opentype_feature_overrides(const RID &p_font_r
fd->feature_overrides = p_overrides;
}
-Dictionary TextServerFallback::font_get_opentype_feature_overrides(const RID &p_font_rid) const {
+Dictionary TextServerFallback::_font_get_opentype_feature_overrides(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -2545,11 +2559,11 @@ Dictionary TextServerFallback::font_get_opentype_feature_overrides(const RID &p_
return fd->feature_overrides;
}
-Dictionary TextServerFallback::font_supported_feature_list(const RID &p_font_rid) const {
+Dictionary TextServerFallback::_font_supported_feature_list(const RID &p_font_rid) const {
return Dictionary();
}
-Dictionary TextServerFallback::font_supported_variation_list(const RID &p_font_rid) const {
+Dictionary TextServerFallback::_font_supported_variation_list(const RID &p_font_rid) const {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Dictionary());
@@ -2559,11 +2573,11 @@ Dictionary TextServerFallback::font_supported_variation_list(const RID &p_font_r
return fd->supported_varaitions;
}
-double TextServerFallback::font_get_global_oversampling() const {
+double TextServerFallback::_font_get_global_oversampling() const {
return oversampling;
}
-void TextServerFallback::font_set_global_oversampling(double p_oversampling) {
+void TextServerFallback::_font_set_global_oversampling(double p_oversampling) {
_THREAD_SAFE_METHOD_
if (oversampling != p_oversampling) {
oversampling = p_oversampling;
@@ -2571,8 +2585,8 @@ void TextServerFallback::font_set_global_oversampling(double p_oversampling) {
font_owner.get_owned_list(&fonts);
bool font_cleared = false;
for (const RID &E : fonts) {
- if (!font_is_multichannel_signed_distance_field(E) && font_get_oversampling(E) <= 0) {
- font_clear_size_cache(E);
+ if (!_font_is_multichannel_signed_distance_field(E) && _font_get_oversampling(E) <= 0) {
+ _font_clear_size_cache(E);
font_cleared = true;
}
}
@@ -2627,7 +2641,7 @@ void TextServerFallback::full_copy(ShapedTextDataFallback *p_shaped) {
p_shaped->parent = RID();
}
-RID TextServerFallback::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
+RID TextServerFallback::_create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
_THREAD_SAFE_METHOD_
ShapedTextDataFallback *sd = memnew(ShapedTextDataFallback);
@@ -2637,7 +2651,7 @@ RID TextServerFallback::create_shaped_text(TextServer::Direction p_direction, Te
return shaped_owner.make_rid(sd);
}
-void TextServerFallback::shaped_text_clear(const RID &p_shaped) {
+void TextServerFallback::_shaped_text_clear(const RID &p_shaped) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -2651,21 +2665,21 @@ void TextServerFallback::shaped_text_clear(const RID &p_shaped) {
invalidate(sd);
}
-void TextServerFallback::shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {
+void TextServerFallback::_shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {
if (p_direction == DIRECTION_RTL) {
ERR_PRINT_ONCE("Right-to-left layout is not supported by this text server.");
}
}
-TextServer::Direction TextServerFallback::shaped_text_get_direction(const RID &p_shaped) const {
+TextServer::Direction TextServerFallback::_shaped_text_get_direction(const RID &p_shaped) const {
return TextServer::DIRECTION_LTR;
}
-TextServer::Direction TextServerFallback::shaped_text_get_inferred_direction(const RID &p_shaped) const {
+TextServer::Direction TextServerFallback::_shaped_text_get_inferred_direction(const RID &p_shaped) const {
return TextServer::DIRECTION_LTR;
}
-void TextServerFallback::shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {
+void TextServerFallback::_shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {
_THREAD_SAFE_METHOD_
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -2679,14 +2693,14 @@ void TextServerFallback::shaped_text_set_custom_punctuation(const RID &p_shaped,
}
}
-String TextServerFallback::shaped_text_get_custom_punctuation(const RID &p_shaped) const {
+String TextServerFallback::_shaped_text_get_custom_punctuation(const RID &p_shaped) const {
_THREAD_SAFE_METHOD_
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, String());
return sd->custom_punct;
}
-void TextServerFallback::shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {
+void TextServerFallback::_shaped_text_set_orientation(const RID &p_shaped, TextServer::Orientation p_orientation) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -2700,11 +2714,11 @@ void TextServerFallback::shaped_text_set_orientation(const RID &p_shaped, TextSe
}
}
-void TextServerFallback::shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {
+void TextServerFallback::_shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {
// No BiDi support, ignore.
}
-TextServer::Orientation TextServerFallback::shaped_text_get_orientation(const RID &p_shaped) const {
+TextServer::Orientation TextServerFallback::_shaped_text_get_orientation(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::ORIENTATION_HORIZONTAL);
@@ -2712,7 +2726,7 @@ TextServer::Orientation TextServerFallback::shaped_text_get_orientation(const RI
return sd->orientation;
}
-void TextServerFallback::shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {
+void TextServerFallback::_shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
MutexLock lock(sd->mutex);
@@ -2726,7 +2740,7 @@ void TextServerFallback::shaped_text_set_preserve_invalid(const RID &p_shaped, b
}
}
-bool TextServerFallback::shaped_text_get_preserve_invalid(const RID &p_shaped) const {
+bool TextServerFallback::_shaped_text_get_preserve_invalid(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -2734,7 +2748,7 @@ bool TextServerFallback::shaped_text_get_preserve_invalid(const RID &p_shaped) c
return sd->preserve_invalid;
}
-void TextServerFallback::shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {
+void TextServerFallback::_shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -2748,7 +2762,7 @@ void TextServerFallback::shaped_text_set_preserve_control(const RID &p_shaped, b
}
}
-bool TextServerFallback::shaped_text_get_preserve_control(const RID &p_shaped) const {
+bool TextServerFallback::_shaped_text_get_preserve_control(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -2756,7 +2770,7 @@ bool TextServerFallback::shaped_text_get_preserve_control(const RID &p_shaped) c
return sd->preserve_control;
}
-void TextServerFallback::shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) {
+void TextServerFallback::_shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) {
ERR_FAIL_INDEX((int)p_spacing, 4);
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
@@ -2771,7 +2785,7 @@ void TextServerFallback::shaped_text_set_spacing(const RID &p_shaped, SpacingTyp
}
}
-int64_t TextServerFallback::shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const {
+int64_t TextServerFallback::_shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const {
ERR_FAIL_INDEX_V((int)p_spacing, 4, 0);
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
@@ -2781,20 +2795,20 @@ int64_t TextServerFallback::shaped_text_get_spacing(const RID &p_shaped, Spacing
return sd->extra_spacing[p_spacing];
}
-int64_t TextServerFallback::shaped_get_span_count(const RID &p_shaped) const {
+int64_t TextServerFallback::_shaped_get_span_count(const RID &p_shaped) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0);
return sd->spans.size();
}
-Variant TextServerFallback::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
+Variant TextServerFallback::_shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Variant());
ERR_FAIL_INDEX_V(p_index, sd->spans.size(), Variant());
return sd->spans[p_index].meta;
}
-void TextServerFallback::shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
+void TextServerFallback::_shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
ERR_FAIL_INDEX(p_index, sd->spans.size());
@@ -2805,7 +2819,7 @@ void TextServerFallback::shaped_set_span_update_font(const RID &p_shaped, int64_
Array fonts_no_match;
int font_count = p_fonts.size();
for (int i = 0; i < font_count; i++) {
- if (font_is_language_supported(p_fonts[i], span.language)) {
+ if (_font_is_language_supported(p_fonts[i], span.language)) {
span.fonts.push_back(p_fonts[i]);
} else {
fonts_no_match.push_back(p_fonts[i]);
@@ -2818,7 +2832,7 @@ void TextServerFallback::shaped_set_span_update_font(const RID &p_shaped, int64_
sd->valid = false;
}
-bool TextServerFallback::shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {
+bool TextServerFallback::_shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -2848,7 +2862,7 @@ bool TextServerFallback::shaped_text_add_string(const RID &p_shaped, const Strin
span.fonts.push_back(p_fonts[0]);
}
for (int i = 1; i < font_count; i++) {
- if (font_is_language_supported(p_fonts[i], p_language)) {
+ if (_font_is_language_supported(p_fonts[i], p_language)) {
span.fonts.push_back(p_fonts[i]);
} else {
fonts_no_match.push_back(p_fonts[i]);
@@ -2869,7 +2883,7 @@ bool TextServerFallback::shaped_text_add_string(const RID &p_shaped, const Strin
return true;
}
-bool TextServerFallback::shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, int64_t p_length) {
+bool TextServerFallback::_shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, int64_t p_length) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -2900,7 +2914,7 @@ bool TextServerFallback::shaped_text_add_object(const RID &p_shaped, const Varia
return true;
}
-bool TextServerFallback::shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align) {
+bool TextServerFallback::_shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -2941,14 +2955,14 @@ bool TextServerFallback::shaped_text_resize_object(const RID &p_shaped, const Va
} else {
if (gl.font_rid.is_valid()) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- sd->ascent = MAX(sd->ascent, font_get_ascent(gl.font_rid, gl.font_size));
- sd->descent = MAX(sd->descent, font_get_descent(gl.font_rid, gl.font_size));
+ sd->ascent = MAX(sd->ascent, _font_get_ascent(gl.font_rid, gl.font_size));
+ sd->descent = MAX(sd->descent, _font_get_descent(gl.font_rid, gl.font_size));
} else {
- sd->ascent = MAX(sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
- sd->descent = MAX(sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->ascent = MAX(sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->descent = MAX(sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
- sd->upos = MAX(sd->upos, font_get_underline_position(gl.font_rid, gl.font_size));
- sd->uthk = MAX(sd->uthk, font_get_underline_thickness(gl.font_rid, gl.font_size));
+ sd->upos = MAX(sd->upos, _font_get_underline_position(gl.font_rid, gl.font_size));
+ sd->uthk = MAX(sd->uthk, _font_get_underline_thickness(gl.font_rid, gl.font_size));
} else if (sd->preserve_invalid || (sd->preserve_control && is_control(gl.index))) {
// Glyph not found, replace with hex code box.
if (sd->orientation == ORIENTATION_HORIZONTAL) {
@@ -3035,7 +3049,7 @@ void TextServerFallback::_realign(ShapedTextDataFallback *p_sd) const {
p_sd->descent = full_descent;
}
-RID TextServerFallback::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
+RID TextServerFallback::_shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
_THREAD_SAFE_METHOD_
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
@@ -3043,10 +3057,10 @@ RID TextServerFallback::shaped_text_substr(const RID &p_shaped, int64_t p_start,
MutexLock lock(sd->mutex);
if (sd->parent != RID()) {
- return shaped_text_substr(sd->parent, p_start, p_length);
+ return _shaped_text_substr(sd->parent, p_start, p_length);
}
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
ERR_FAIL_COND_V(p_start < 0 || p_length < 0, RID());
ERR_FAIL_COND_V(sd->start > p_start || sd->end < p_start, RID());
@@ -3101,11 +3115,11 @@ RID TextServerFallback::shaped_text_substr(const RID &p_shaped, int64_t p_start,
} else {
if (gl.font_rid.is_valid()) {
if (new_sd->orientation == ORIENTATION_HORIZONTAL) {
- new_sd->ascent = MAX(new_sd->ascent, font_get_ascent(gl.font_rid, gl.font_size));
- new_sd->descent = MAX(new_sd->descent, font_get_descent(gl.font_rid, gl.font_size));
+ new_sd->ascent = MAX(new_sd->ascent, _font_get_ascent(gl.font_rid, gl.font_size));
+ new_sd->descent = MAX(new_sd->descent, _font_get_descent(gl.font_rid, gl.font_size));
} else {
- new_sd->ascent = MAX(new_sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
- new_sd->descent = MAX(new_sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ new_sd->ascent = MAX(new_sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ new_sd->descent = MAX(new_sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
} else if (new_sd->preserve_invalid || (new_sd->preserve_control && is_control(gl.index))) {
// Glyph not found, replace with hex code box.
@@ -3129,7 +3143,7 @@ RID TextServerFallback::shaped_text_substr(const RID &p_shaped, int64_t p_start,
return shaped_owner.make_rid(new_sd);
}
-RID TextServerFallback::shaped_text_get_parent(const RID &p_shaped) const {
+RID TextServerFallback::_shaped_text_get_parent(const RID &p_shaped) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, RID());
@@ -3137,16 +3151,16 @@ RID TextServerFallback::shaped_text_get_parent(const RID &p_shaped) const {
return sd->parent;
}
-double TextServerFallback::shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<JustificationFlag> p_jst_flags) {
+double TextServerFallback::_shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<JustificationFlag> p_jst_flags) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
if (!sd->justification_ops_valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_update_justification_ops(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_update_justification_ops(p_shaped);
}
int start_pos = 0;
@@ -3246,16 +3260,16 @@ double TextServerFallback::shaped_text_fit_to_width(const RID &p_shaped, double
return Math::ceil(justification_width);
}
-double TextServerFallback::shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {
+double TextServerFallback::_shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
if (!sd->line_breaks_valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_update_breaks(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_update_breaks(p_shaped);
}
for (int i = 0; i < p_tab_stops.size(); i++) {
@@ -3302,13 +3316,13 @@ double TextServerFallback::shaped_text_tab_align(const RID &p_shaped, const Pack
return 0.0;
}
-bool TextServerFallback::shaped_text_update_breaks(const RID &p_shaped) {
+bool TextServerFallback::_shaped_text_update_breaks(const RID &p_shaped) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- shaped_text_shape(p_shaped);
+ _shaped_text_shape(p_shaped);
}
if (sd->line_breaks_valid) {
@@ -3358,29 +3372,29 @@ bool TextServerFallback::shaped_text_update_breaks(const RID &p_shaped) {
return sd->line_breaks_valid;
}
-bool TextServerFallback::shaped_text_update_justification_ops(const RID &p_shaped) {
+bool TextServerFallback::_shaped_text_update_justification_ops(const RID &p_shaped) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- shaped_text_shape(p_shaped);
+ _shaped_text_shape(p_shaped);
}
if (!sd->line_breaks_valid) {
- shaped_text_update_breaks(p_shaped);
+ _shaped_text_update_breaks(p_shaped);
}
sd->justification_ops_valid = true; // Not supported by fallback server.
return true;
}
-void TextServerFallback::shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {
+void TextServerFallback::_shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped_line);
ERR_FAIL_COND_MSG(!sd, "ShapedTextDataFallback invalid.");
MutexLock lock(sd->mutex);
if (!sd->valid) {
- shaped_text_shape(p_shaped_line);
+ _shaped_text_shape(p_shaped_line);
}
sd->text_trimmed = false;
@@ -3419,30 +3433,30 @@ void TextServerFallback::shaped_text_overrun_trim_to_width(const RID &p_shaped_l
// Find usable fonts, if fonts from the last glyph do not have required chars.
RID dot_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
- if (!font_has_char(dot_gl_font_rid, '.')) {
+ if (!_font_has_char(dot_gl_font_rid, '.')) {
const Array &fonts = spans[spans.size() - 1].fonts;
for (int i = 0; i < fonts.size(); i++) {
- if (font_has_char(fonts[i], '.')) {
+ if (_font_has_char(fonts[i], '.')) {
dot_gl_font_rid = fonts[i];
break;
}
}
}
RID whitespace_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
- if (!font_has_char(whitespace_gl_font_rid, '.')) {
+ if (!_font_has_char(whitespace_gl_font_rid, '.')) {
const Array &fonts = spans[spans.size() - 1].fonts;
for (int i = 0; i < fonts.size(); i++) {
- if (font_has_char(fonts[i], ' ')) {
+ if (_font_has_char(fonts[i], ' ')) {
whitespace_gl_font_rid = fonts[i];
break;
}
}
}
- int32_t dot_gl_idx = dot_gl_font_rid.is_valid() ? font_get_glyph_index(dot_gl_font_rid, last_gl_font_size, '.') : -10;
- Vector2 dot_adv = dot_gl_font_rid.is_valid() ? font_get_glyph_advance(dot_gl_font_rid, last_gl_font_size, dot_gl_idx) : Vector2();
- int32_t whitespace_gl_idx = whitespace_gl_font_rid.is_valid() ? font_get_glyph_index(whitespace_gl_font_rid, last_gl_font_size, ' ') : -10;
- Vector2 whitespace_adv = whitespace_gl_font_rid.is_valid() ? font_get_glyph_advance(whitespace_gl_font_rid, last_gl_font_size, whitespace_gl_idx) : Vector2();
+ int32_t dot_gl_idx = dot_gl_font_rid.is_valid() ? _font_get_glyph_index(dot_gl_font_rid, last_gl_font_size, '.', 0) : -10;
+ Vector2 dot_adv = dot_gl_font_rid.is_valid() ? _font_get_glyph_advance(dot_gl_font_rid, last_gl_font_size, dot_gl_idx) : Vector2();
+ int32_t whitespace_gl_idx = whitespace_gl_font_rid.is_valid() ? _font_get_glyph_index(whitespace_gl_font_rid, last_gl_font_size, ' ', 0) : -10;
+ Vector2 whitespace_adv = whitespace_gl_font_rid.is_valid() ? _font_get_glyph_advance(whitespace_gl_font_rid, last_gl_font_size, whitespace_gl_idx) : Vector2();
int ellipsis_width = 0;
if (add_ellipsis && whitespace_gl_font_rid.is_valid()) {
@@ -3531,7 +3545,7 @@ void TextServerFallback::shaped_text_overrun_trim_to_width(const RID &p_shaped_l
}
}
-int64_t TextServerFallback::shaped_text_get_trim_pos(const RID &p_shaped) const {
+int64_t TextServerFallback::_shaped_text_get_trim_pos(const RID &p_shaped) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, -1, "ShapedTextDataFallback invalid.");
@@ -3539,7 +3553,7 @@ int64_t TextServerFallback::shaped_text_get_trim_pos(const RID &p_shaped) const
return sd->overrun_trim_data.trim_pos;
}
-int64_t TextServerFallback::shaped_text_get_ellipsis_pos(const RID &p_shaped) const {
+int64_t TextServerFallback::_shaped_text_get_ellipsis_pos(const RID &p_shaped) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, -1, "ShapedTextDataFallback invalid.");
@@ -3547,7 +3561,7 @@ int64_t TextServerFallback::shaped_text_get_ellipsis_pos(const RID &p_shaped) co
return sd->overrun_trim_data.ellipsis_pos;
}
-const Glyph *TextServerFallback::shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {
+const Glyph *TextServerFallback::_shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, nullptr, "ShapedTextDataFallback invalid.");
@@ -3555,7 +3569,7 @@ const Glyph *TextServerFallback::shaped_text_get_ellipsis_glyphs(const RID &p_sh
return sd->overrun_trim_data.ellipsis_glyph_buf.ptr();
}
-int64_t TextServerFallback::shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {
+int64_t TextServerFallback::_shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, 0, "ShapedTextDataFallback invalid.");
@@ -3563,7 +3577,7 @@ int64_t TextServerFallback::shaped_text_get_ellipsis_glyph_count(const RID &p_sh
return sd->overrun_trim_data.ellipsis_glyph_buf.size();
}
-bool TextServerFallback::shaped_text_shape(const RID &p_shaped) {
+bool TextServerFallback::_shaped_text_shape(const RID &p_shaped) {
ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -3630,27 +3644,27 @@ bool TextServerFallback::shaped_text_shape(const RID &p_shaped) {
}
// Select first font which has character (font are already sorted by span language).
for (int k = 0; k < span.fonts.size(); k++) {
- if (font_has_char(span.fonts[k], gl.index)) {
+ if (_font_has_char(span.fonts[k], gl.index)) {
gl.font_rid = span.fonts[k];
break;
}
}
if (gl.font_rid.is_valid()) {
- bool subpos = (font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_ONE_HALF) || (font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_AUTO && gl.font_size <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
+ bool subpos = (_font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_ONE_HALF) || (_font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_ONE_QUARTER) || (_font_get_subpixel_positioning(gl.font_rid) == SUBPIXEL_POSITIONING_AUTO && gl.font_size <= SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE);
if (sd->text[j - sd->start] != 0 && !is_linebreak(sd->text[j - sd->start])) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- gl.advance = Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x);
+ gl.advance = Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x);
gl.x_off = 0;
gl.y_off = 0;
- sd->ascent = MAX(sd->ascent, font_get_ascent(gl.font_rid, gl.font_size));
- sd->descent = MAX(sd->descent, font_get_descent(gl.font_rid, gl.font_size));
+ sd->ascent = MAX(sd->ascent, _font_get_ascent(gl.font_rid, gl.font_size));
+ sd->descent = MAX(sd->descent, _font_get_descent(gl.font_rid, gl.font_size));
} else {
- gl.advance = Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).y);
- gl.x_off = -Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5);
- gl.y_off = font_get_ascent(gl.font_rid, gl.font_size);
- sd->ascent = MAX(sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
- sd->descent = MAX(sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ gl.advance = Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).y);
+ gl.x_off = -Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5);
+ gl.y_off = _font_get_ascent(gl.font_rid, gl.font_size);
+ sd->ascent = MAX(sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->descent = MAX(sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
}
if (j < sd->end - 1) {
@@ -3661,17 +3675,17 @@ bool TextServerFallback::shaped_text_shape(const RID &p_shaped) {
gl.advance += sd->extra_spacing[SPACING_GLYPH];
}
}
- sd->upos = MAX(sd->upos, font_get_underline_position(gl.font_rid, gl.font_size));
- sd->uthk = MAX(sd->uthk, font_get_underline_thickness(gl.font_rid, gl.font_size));
+ sd->upos = MAX(sd->upos, _font_get_underline_position(gl.font_rid, gl.font_size));
+ sd->uthk = MAX(sd->uthk, _font_get_underline_thickness(gl.font_rid, gl.font_size));
// Add kerning to previous glyph.
if (sd->glyphs.size() > 0) {
Glyph &prev_gl = sd->glyphs.write[sd->glyphs.size() - 1];
if (prev_gl.font_rid == gl.font_rid && prev_gl.font_size == gl.font_size) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- prev_gl.advance += font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).x;
+ prev_gl.advance += _font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).x;
} else {
- prev_gl.advance += font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).y;
+ prev_gl.advance += _font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).y;
}
}
}
@@ -3702,7 +3716,7 @@ bool TextServerFallback::shaped_text_shape(const RID &p_shaped) {
return sd->valid;
}
-bool TextServerFallback::shaped_text_is_ready(const RID &p_shaped) const {
+bool TextServerFallback::_shaped_text_is_ready(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
@@ -3710,41 +3724,41 @@ bool TextServerFallback::shaped_text_is_ready(const RID &p_shaped) const {
return sd->valid;
}
-const Glyph *TextServerFallback::shaped_text_get_glyphs(const RID &p_shaped) const {
+const Glyph *TextServerFallback::_shaped_text_get_glyphs(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, nullptr);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->glyphs.ptr();
}
-int64_t TextServerFallback::shaped_text_get_glyph_count(const RID &p_shaped) const {
+int64_t TextServerFallback::_shaped_text_get_glyph_count(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->glyphs.size();
}
-const Glyph *TextServerFallback::shaped_text_sort_logical(const RID &p_shaped) {
+const Glyph *TextServerFallback::_shaped_text_sort_logical(const RID &p_shaped) {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, nullptr);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->glyphs.ptr(); // Already in the logical order, return as is.
}
-Vector2i TextServerFallback::shaped_text_get_range(const RID &p_shaped) const {
+Vector2i TextServerFallback::_shaped_text_get_range(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector2i());
@@ -3752,7 +3766,7 @@ Vector2i TextServerFallback::shaped_text_get_range(const RID &p_shaped) const {
return Vector2(sd->start, sd->end);
}
-Array TextServerFallback::shaped_text_get_objects(const RID &p_shaped) const {
+Array TextServerFallback::_shaped_text_get_objects(const RID &p_shaped) const {
Array ret;
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, ret);
@@ -3765,25 +3779,25 @@ Array TextServerFallback::shaped_text_get_objects(const RID &p_shaped) const {
return ret;
}
-Rect2 TextServerFallback::shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {
+Rect2 TextServerFallback::_shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Rect2());
MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(!sd->objects.has(p_key), Rect2());
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->objects[p_key].rect;
}
-Size2 TextServerFallback::shaped_text_get_size(const RID &p_shaped) const {
+Size2 TextServerFallback::_shaped_text_get_size(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Size2());
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
if (sd->orientation == TextServer::ORIENTATION_HORIZONTAL) {
return Size2(sd->width, sd->ascent + sd->descent + sd->extra_spacing[SPACING_TOP] + sd->extra_spacing[SPACING_BOTTOM]).ceil();
@@ -3792,64 +3806,64 @@ Size2 TextServerFallback::shaped_text_get_size(const RID &p_shaped) const {
}
}
-double TextServerFallback::shaped_text_get_ascent(const RID &p_shaped) const {
+double TextServerFallback::_shaped_text_get_ascent(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->ascent + sd->extra_spacing[SPACING_TOP];
}
-double TextServerFallback::shaped_text_get_descent(const RID &p_shaped) const {
+double TextServerFallback::_shaped_text_get_descent(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->descent + sd->extra_spacing[SPACING_BOTTOM];
}
-double TextServerFallback::shaped_text_get_width(const RID &p_shaped) const {
+double TextServerFallback::_shaped_text_get_width(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return Math::ceil(sd->width);
}
-double TextServerFallback::shaped_text_get_underline_position(const RID &p_shaped) const {
+double TextServerFallback::_shaped_text_get_underline_position(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->upos;
}
-double TextServerFallback::shaped_text_get_underline_thickness(const RID &p_shaped) const {
+double TextServerFallback::_shaped_text_get_underline_thickness(const RID &p_shaped) const {
const ShapedTextDataFallback *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.0);
MutexLock lock(sd->mutex);
if (!sd->valid) {
- const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
+ const_cast<TextServerFallback *>(this)->_shaped_text_shape(p_shaped);
}
return sd->uthk;
}
-String TextServerFallback::string_to_upper(const String &p_string, const String &p_language) const {
+String TextServerFallback::_string_to_upper(const String &p_string, const String &p_language) const {
String upper = p_string;
for (int i = 0; i <= upper.length(); i++) {
@@ -3863,7 +3877,7 @@ String TextServerFallback::string_to_upper(const String &p_string, const String
return upper;
}
-String TextServerFallback::string_to_lower(const String &p_string, const String &p_language) const {
+String TextServerFallback::_string_to_lower(const String &p_string, const String &p_language) const {
String lower = p_string;
for (int i = 0; i <= lower.length(); i++) {
@@ -3877,7 +3891,7 @@ String TextServerFallback::string_to_lower(const String &p_string, const String
return lower;
}
-PackedInt32Array TextServerFallback::string_get_word_breaks(const String &p_string, const String &p_language) const {
+PackedInt32Array TextServerFallback::_string_get_word_breaks(const String &p_string, const String &p_language) const {
PackedInt32Array ret;
for (int i = 0; i < p_string.length(); i++) {
char32_t c = p_string[i];
diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h
index 42f311f5ad..4aeec4f452 100644
--- a/modules/text_server_fb/text_server_fb.h
+++ b/modules/text_server_fb/text_server_fb.h
@@ -42,6 +42,7 @@
#include <godot_cpp/godot.hpp>
#include <godot_cpp/core/class_db.hpp>
+#include <godot_cpp/core/ext_wrappers.gen.inc>
#include <godot_cpp/core/mutex_lock.hpp>
#include <godot_cpp/variant/array.hpp>
@@ -80,6 +81,7 @@ using namespace godot;
#include "servers/text/text_server_extension.h"
+#include "core/extension/ext_wrappers.gen.inc"
#include "core/object/worker_thread_pool.h"
#include "core/templates/hash_map.h"
#include "core/templates/rid_owner.h"
@@ -338,251 +340,249 @@ protected:
void invalidate(ShapedTextDataFallback *p_shaped);
public:
- virtual bool has_feature(Feature p_feature) const override;
- virtual String get_name() const override;
- virtual int64_t get_features() const override;
+ MODBIND1RC(bool, has_feature, Feature);
+ MODBIND0RC(String, get_name);
+ MODBIND0RC(int64_t, get_features);
- virtual void free_rid(const RID &p_rid) override;
- virtual bool has(const RID &p_rid) override;
- virtual bool load_support_data(const String &p_filename) override;
+ MODBIND1(free_rid, const RID &);
+ MODBIND1R(bool, has, const RID &);
+ MODBIND1R(bool, load_support_data, const String &);
- virtual String get_support_data_filename() const override {
- return "";
- };
- virtual String get_support_data_info() const override {
- return "Not supported";
- };
- virtual bool save_support_data(const String &p_filename) const override;
+ MODBIND0RC(String, get_support_data_filename);
+ MODBIND0RC(String, get_support_data_info);
+ MODBIND1RC(bool, save_support_data, const String &);
- virtual bool is_locale_right_to_left(const String &p_locale) const override;
+ MODBIND1RC(bool, is_locale_right_to_left, const String &);
- virtual int64_t name_to_tag(const String &p_name) const override;
- virtual String tag_to_name(int64_t p_tag) const override;
+ MODBIND1RC(int64_t, name_to_tag, const String &);
+ MODBIND1RC(String, tag_to_name, int64_t);
/* Font interface */
- virtual RID create_font() override;
- virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) override;
- virtual void font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) override;
+ MODBIND0R(RID, create_font);
+
+ MODBIND2(font_set_data, const RID &, const PackedByteArray &);
+ MODBIND3(font_set_data_ptr, const RID &, const uint8_t *, int64_t);
+
+ MODBIND2(font_set_face_index, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_face_index, const RID &);
- virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) override;
- virtual int64_t font_get_face_index(const RID &p_font_rid) const override;
+ MODBIND1RC(int64_t, font_get_face_count, const RID &);
- virtual int64_t font_get_face_count(const RID &p_font_rid) const override;
+ MODBIND2(font_set_style, const RID &, BitField<FontStyle>);
+ MODBIND1RC(BitField<FontStyle>, font_get_style, const RID &);
- virtual void font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) override;
- virtual BitField<FontStyle> font_get_style(const RID &p_font_rid) const override;
+ MODBIND2(font_set_style_name, const RID &, const String &);
+ MODBIND1RC(String, font_get_style_name, const RID &);
- virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) override;
- virtual String font_get_style_name(const RID &p_font_rid) const override;
+ MODBIND2(font_set_name, const RID &, const String &);
+ MODBIND1RC(String, font_get_name, const RID &);
- virtual void font_set_name(const RID &p_font_rid, const String &p_name) override;
- virtual String font_get_name(const RID &p_font_rid) const override;
+ MODBIND2(font_set_antialiasing, const RID &, TextServer::FontAntialiasing);
+ MODBIND1RC(TextServer::FontAntialiasing, font_get_antialiasing, const RID &);
- virtual void font_set_antialiasing(RID p_font_rid, TextServer::FontAntialiasing p_antialiasing) override;
- virtual TextServer::FontAntialiasing font_get_antialiasing(RID p_font_rid) const override;
+ MODBIND2(font_set_generate_mipmaps, const RID &, bool);
+ MODBIND1RC(bool, font_get_generate_mipmaps, const RID &);
- virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) override;
- virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const override;
+ MODBIND2(font_set_multichannel_signed_distance_field, const RID &, bool);
+ MODBIND1RC(bool, font_is_multichannel_signed_distance_field, const RID &);
- virtual void font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) override;
- virtual bool font_is_multichannel_signed_distance_field(const RID &p_font_rid) const override;
+ MODBIND2(font_set_msdf_pixel_range, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_msdf_pixel_range, const RID &);
- virtual void font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) override;
- virtual int64_t font_get_msdf_pixel_range(const RID &p_font_rid) const override;
+ MODBIND2(font_set_msdf_size, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_msdf_size, const RID &);
- virtual void font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) override;
- virtual int64_t font_get_msdf_size(const RID &p_font_rid) const override;
+ MODBIND2(font_set_fixed_size, const RID &, int64_t);
+ MODBIND1RC(int64_t, font_get_fixed_size, const RID &);
- virtual void font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) override;
- virtual int64_t font_get_fixed_size(const RID &p_font_rid) const override;
+ MODBIND2(font_set_force_autohinter, const RID &, bool);
+ MODBIND1RC(bool, font_is_force_autohinter, const RID &);
- virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) override;
- virtual bool font_is_force_autohinter(const RID &p_font_rid) const override;
+ MODBIND2(font_set_subpixel_positioning, const RID &, SubpixelPositioning);
+ MODBIND1RC(SubpixelPositioning, font_get_subpixel_positioning, const RID &);
- virtual void font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) override;
- virtual TextServer::Hinting font_get_hinting(const RID &p_font_rid) const override;
+ MODBIND2(font_set_embolden, const RID &, double);
+ MODBIND1RC(double, font_get_embolden, const RID &);
- virtual void font_set_subpixel_positioning(const RID &p_font_rid, SubpixelPositioning p_subpixel) override;
- virtual SubpixelPositioning font_get_subpixel_positioning(const RID &p_font_rid) const override;
+ MODBIND2(font_set_transform, const RID &, const Transform2D &);
+ MODBIND1RC(Transform2D, font_get_transform, const RID &);
- virtual void font_set_embolden(const RID &p_font_rid, double p_strength) override;
- virtual double font_get_embolden(const RID &p_font_rid) const override;
+ MODBIND2(font_set_variation_coordinates, const RID &, const Dictionary &);
+ MODBIND1RC(Dictionary, font_get_variation_coordinates, const RID &);
- virtual void font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) override;
- virtual Transform2D font_get_transform(const RID &p_font_rid) const override;
+ MODBIND2(font_set_hinting, const RID &, TextServer::Hinting);
+ MODBIND1RC(TextServer::Hinting, font_get_hinting, const RID &);
- virtual void font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) override;
- virtual Dictionary font_get_variation_coordinates(const RID &p_font_rid) const override;
+ MODBIND2(font_set_oversampling, const RID &, double);
+ MODBIND1RC(double, font_get_oversampling, const RID &);
- virtual void font_set_oversampling(const RID &p_font_rid, double p_oversampling) override;
- virtual double font_get_oversampling(const RID &p_font_rid) const override;
+ MODBIND1RC(TypedArray<Vector2i>, font_get_size_cache_list, const RID &);
+ MODBIND1(font_clear_size_cache, const RID &);
+ MODBIND2(font_remove_size_cache, const RID &, const Vector2i &);
- virtual TypedArray<Vector2i> font_get_size_cache_list(const RID &p_font_rid) const override;
- virtual void font_clear_size_cache(const RID &p_font_rid) override;
- virtual void font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) override;
+ MODBIND3(font_set_ascent, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_ascent, const RID &, int64_t);
- virtual void font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) override;
- virtual double font_get_ascent(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_descent, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_descent, const RID &, int64_t);
- virtual void font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) override;
- virtual double font_get_descent(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_underline_position, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_underline_position, const RID &, int64_t);
- virtual void font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) override;
- virtual double font_get_underline_position(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_underline_thickness, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_underline_thickness, const RID &, int64_t);
- virtual void font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) override;
- virtual double font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND3(font_set_scale, const RID &, int64_t, double);
+ MODBIND2RC(double, font_get_scale, const RID &, int64_t);
- virtual void font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) override;
- virtual double font_get_scale(const RID &p_font_rid, int64_t p_size) const override;
+ MODBIND2RC(int64_t, font_get_texture_count, const RID &, const Vector2i &);
+ MODBIND2(font_clear_textures, const RID &, const Vector2i &);
+ MODBIND3(font_remove_texture, const RID &, const Vector2i &, int64_t);
- virtual int64_t font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const override;
- virtual void font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) override;
- virtual void font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) override;
+ MODBIND4(font_set_texture_image, const RID &, const Vector2i &, int64_t, const Ref<Image> &);
+ MODBIND3RC(Ref<Image>, font_get_texture_image, const RID &, const Vector2i &, int64_t);
- virtual void font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) override;
- virtual Ref<Image> font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
+ MODBIND4(font_set_texture_offsets, const RID &, const Vector2i &, int64_t, const PackedInt32Array &);
+ MODBIND3RC(PackedInt32Array, font_get_texture_offsets, const RID &, const Vector2i &, int64_t);
- virtual void font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) override;
- virtual PackedInt32Array font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
+ MODBIND2RC(PackedInt32Array, font_get_glyph_list, const RID &, const Vector2i &);
+ MODBIND2(font_clear_glyphs, const RID &, const Vector2i &);
+ MODBIND3(font_remove_glyph, const RID &, const Vector2i &, int64_t);
- virtual PackedInt32Array font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const override;
- virtual void font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) override;
- virtual void font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) override;
+ MODBIND3RC(Vector2, font_get_glyph_advance, const RID &, int64_t, int64_t);
+ MODBIND4(font_set_glyph_advance, const RID &, int64_t, int64_t, const Vector2 &);
- virtual Vector2 font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) override;
+ MODBIND3RC(Vector2, font_get_glyph_offset, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_offset, const RID &, const Vector2i &, int64_t, const Vector2 &);
- virtual Vector2 font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) override;
+ MODBIND3RC(Vector2, font_get_glyph_size, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_size, const RID &, const Vector2i &, int64_t, const Vector2 &);
- virtual Vector2 font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) override;
+ MODBIND3RC(Rect2, font_get_glyph_uv_rect, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_uv_rect, const RID &, const Vector2i &, int64_t, const Rect2 &);
- virtual Rect2 font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) override;
+ MODBIND3RC(int64_t, font_get_glyph_texture_idx, const RID &, const Vector2i &, int64_t);
+ MODBIND4(font_set_glyph_texture_idx, const RID &, const Vector2i &, int64_t, int64_t);
- virtual int64_t font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual void font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) override;
- virtual RID font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- virtual Size2 font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
+ MODBIND3RC(RID, font_get_glyph_texture_rid, const RID &, const Vector2i &, int64_t);
+ MODBIND3RC(Size2, font_get_glyph_texture_size, const RID &, const Vector2i &, int64_t);
- virtual Dictionary font_get_glyph_contours(const RID &p_font, int64_t p_size, int64_t p_index) const override;
+ MODBIND3RC(Dictionary, font_get_glyph_contours, const RID &, int64_t, int64_t);
- virtual TypedArray<Vector2i> font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const override;
- virtual void font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) override;
- virtual void font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) override;
+ MODBIND2RC(TypedArray<Vector2i>, font_get_kerning_list, const RID &, int64_t);
+ MODBIND2(font_clear_kerning_map, const RID &, int64_t);
+ MODBIND3(font_remove_kerning, const RID &, int64_t, const Vector2i &);
- virtual void font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
- virtual Vector2 font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const override;
+ MODBIND4(font_set_kerning, const RID &, int64_t, const Vector2i &, const Vector2 &);
+ MODBIND3RC(Vector2, font_get_kerning, const RID &, int64_t, const Vector2i &);
- virtual int64_t font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector = 0) const override;
+ MODBIND4RC(int64_t, font_get_glyph_index, const RID &, int64_t, int64_t, int64_t);
- virtual bool font_has_char(const RID &p_font_rid, int64_t p_char) const override;
- virtual String font_get_supported_chars(const RID &p_font_rid) const override;
+ MODBIND2RC(bool, font_has_char, const RID &, int64_t);
+ MODBIND1RC(String, font_get_supported_chars, const RID &);
- virtual void font_render_range(const RID &p_font, const Vector2i &p_size, int64_t p_start, int64_t p_end) override;
- virtual void font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) override;
+ MODBIND4(font_render_range, const RID &, const Vector2i &, int64_t, int64_t);
+ MODBIND3(font_render_glyph, const RID &, const Vector2i &, int64_t);
- virtual void font_draw_glyph(const RID &p_font, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual void font_draw_glyph_outline(const RID &p_font, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ MODBIND6C(font_draw_glyph, const RID &, const RID &, int64_t, const Vector2 &, int64_t, const Color &);
+ MODBIND7C(font_draw_glyph_outline, const RID &, const RID &, int64_t, int64_t, const Vector2 &, int64_t, const Color &);
- virtual bool font_is_language_supported(const RID &p_font_rid, const String &p_language) const override;
- virtual void font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) override;
- virtual bool font_get_language_support_override(const RID &p_font_rid, const String &p_language) override;
- virtual void font_remove_language_support_override(const RID &p_font_rid, const String &p_language) override;
- virtual PackedStringArray font_get_language_support_overrides(const RID &p_font_rid) override;
+ MODBIND2RC(bool, font_is_language_supported, const RID &, const String &);
+ MODBIND3(font_set_language_support_override, const RID &, const String &, bool);
+ MODBIND2R(bool, font_get_language_support_override, const RID &, const String &);
+ MODBIND2(font_remove_language_support_override, const RID &, const String &);
+ MODBIND1R(PackedStringArray, font_get_language_support_overrides, const RID &);
- virtual bool font_is_script_supported(const RID &p_font_rid, const String &p_script) const override;
- virtual void font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) override;
- virtual bool font_get_script_support_override(const RID &p_font_rid, const String &p_script) override;
- virtual void font_remove_script_support_override(const RID &p_font_rid, const String &p_script) override;
- virtual PackedStringArray font_get_script_support_overrides(const RID &p_font_rid) override;
+ MODBIND2RC(bool, font_is_script_supported, const RID &, const String &);
+ MODBIND3(font_set_script_support_override, const RID &, const String &, bool);
+ MODBIND2R(bool, font_get_script_support_override, const RID &, const String &);
+ MODBIND2(font_remove_script_support_override, const RID &, const String &);
+ MODBIND1R(PackedStringArray, font_get_script_support_overrides, const RID &);
- virtual void font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) override;
- virtual Dictionary font_get_opentype_feature_overrides(const RID &p_font_rid) const override;
+ MODBIND2(font_set_opentype_feature_overrides, const RID &, const Dictionary &);
+ MODBIND1RC(Dictionary, font_get_opentype_feature_overrides, const RID &);
- virtual Dictionary font_supported_feature_list(const RID &p_font_rid) const override;
- virtual Dictionary font_supported_variation_list(const RID &p_font_rid) const override;
+ MODBIND1RC(Dictionary, font_supported_feature_list, const RID &);
+ MODBIND1RC(Dictionary, font_supported_variation_list, const RID &);
- virtual double font_get_global_oversampling() const override;
- virtual void font_set_global_oversampling(double p_oversampling) override;
+ MODBIND0RC(double, font_get_global_oversampling);
+ MODBIND1(font_set_global_oversampling, double);
/* Shaped text buffer interface */
- virtual RID create_shaped_text(Direction p_direction = DIRECTION_AUTO, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
+ MODBIND2R(RID, create_shaped_text, Direction, Orientation);
- virtual void shaped_text_clear(const RID &p_shaped) override;
+ MODBIND1(shaped_text_clear, const RID &);
- virtual void shaped_text_set_direction(const RID &p_shaped, Direction p_direction = DIRECTION_AUTO) override;
- virtual Direction shaped_text_get_direction(const RID &p_shaped) const override;
- virtual Direction shaped_text_get_inferred_direction(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_direction, const RID &, Direction);
+ MODBIND1RC(Direction, shaped_text_get_direction, const RID &);
+ MODBIND1RC(Direction, shaped_text_get_inferred_direction, const RID &);
- virtual void shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) override;
+ MODBIND2(shaped_text_set_bidi_override, const RID &, const Array &);
- virtual void shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) override;
- virtual String shaped_text_get_custom_punctuation(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_custom_punctuation, const RID &, const String &);
+ MODBIND1RC(String, shaped_text_get_custom_punctuation, const RID &);
- virtual void shaped_text_set_orientation(const RID &p_shaped, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
- virtual Orientation shaped_text_get_orientation(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_orientation, const RID &, Orientation);
+ MODBIND1RC(Orientation, shaped_text_get_orientation, const RID &);
- virtual void shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) override;
- virtual bool shaped_text_get_preserve_invalid(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_preserve_invalid, const RID &, bool);
+ MODBIND1RC(bool, shaped_text_get_preserve_invalid, const RID &);
- virtual void shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) override;
- virtual bool shaped_text_get_preserve_control(const RID &p_shaped) const override;
+ MODBIND2(shaped_text_set_preserve_control, const RID &, bool);
+ MODBIND1RC(bool, shaped_text_get_preserve_control, const RID &);
- virtual void shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) override;
- virtual int64_t shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const override;
+ MODBIND3(shaped_text_set_spacing, const RID &, SpacingType, int64_t);
+ MODBIND2RC(int64_t, shaped_text_get_spacing, const RID &, SpacingType);
- virtual bool shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "", const Variant &p_meta = Variant()) override;
- virtual bool shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER, int64_t p_length = 1) override;
- virtual bool shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER) override;
+ MODBIND7R(bool, shaped_text_add_string, const RID &, const String &, const TypedArray<RID> &, int64_t, const Dictionary &, const String &, const Variant &);
+ MODBIND5R(bool, shaped_text_add_object, const RID &, const Variant &, const Size2 &, InlineAlignment, int64_t);
+ MODBIND4R(bool, shaped_text_resize_object, const RID &, const Variant &, const Size2 &, InlineAlignment);
- virtual int64_t shaped_get_span_count(const RID &p_shaped) const override;
- virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const override;
- virtual void shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary()) override;
+ MODBIND1RC(int64_t, shaped_get_span_count, const RID &);
+ MODBIND2RC(Variant, shaped_get_span_meta, const RID &, int64_t);
+ MODBIND5(shaped_set_span_update_font, const RID &, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &);
- virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const override;
- virtual RID shaped_text_get_parent(const RID &p_shaped) const override;
+ MODBIND3RC(RID, shaped_text_substr, const RID &, int64_t, int64_t);
+ MODBIND1RC(RID, shaped_text_get_parent, const RID &);
- virtual double shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
- virtual double shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) override;
+ MODBIND3R(double, shaped_text_fit_to_width, const RID &, double, BitField<TextServer::JustificationFlag>);
+ MODBIND2R(double, shaped_text_tab_align, const RID &, const PackedFloat32Array &);
- virtual bool shaped_text_shape(const RID &p_shaped) override;
- virtual bool shaped_text_update_breaks(const RID &p_shaped) override;
- virtual bool shaped_text_update_justification_ops(const RID &p_shaped) override;
+ MODBIND1R(bool, shaped_text_shape, const RID &);
+ MODBIND1R(bool, shaped_text_update_breaks, const RID &);
+ MODBIND1R(bool, shaped_text_update_justification_ops, const RID &);
- virtual int64_t shaped_text_get_trim_pos(const RID &p_shaped) const override;
- virtual int64_t shaped_text_get_ellipsis_pos(const RID &p_shaped) const override;
- virtual const Glyph *shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const override;
- virtual int64_t shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const override;
+ MODBIND1RC(int64_t, shaped_text_get_trim_pos, const RID &);
+ MODBIND1RC(int64_t, shaped_text_get_ellipsis_pos, const RID &);
+ MODBIND1RC(const Glyph *, shaped_text_get_ellipsis_glyphs, const RID &);
+ MODBIND1RC(int64_t, shaped_text_get_ellipsis_glyph_count, const RID &);
- virtual void shaped_text_overrun_trim_to_width(const RID &p_shaped, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) override;
+ MODBIND3(shaped_text_overrun_trim_to_width, const RID &, double, BitField<TextServer::TextOverrunFlag>);
- virtual bool shaped_text_is_ready(const RID &p_shaped) const override;
+ MODBIND1RC(bool, shaped_text_is_ready, const RID &);
- virtual const Glyph *shaped_text_get_glyphs(const RID &p_shaped) const override;
- virtual const Glyph *shaped_text_sort_logical(const RID &p_shaped) override;
- virtual int64_t shaped_text_get_glyph_count(const RID &p_shaped) const override;
+ MODBIND1RC(const Glyph *, shaped_text_get_glyphs, const RID &);
+ MODBIND1R(const Glyph *, shaped_text_sort_logical, const RID &);
+ MODBIND1RC(int64_t, shaped_text_get_glyph_count, const RID &);
- virtual Vector2i shaped_text_get_range(const RID &p_shaped) const override;
+ MODBIND1RC(Vector2i, shaped_text_get_range, const RID &);
- virtual Array shaped_text_get_objects(const RID &p_shaped) const override;
- virtual Rect2 shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const override;
+ MODBIND1RC(Array, shaped_text_get_objects, const RID &);
+ MODBIND2RC(Rect2, shaped_text_get_object_rect, const RID &, const Variant &);
- virtual Size2 shaped_text_get_size(const RID &p_shaped) const override;
- virtual double shaped_text_get_ascent(const RID &p_shaped) const override;
- virtual double shaped_text_get_descent(const RID &p_shaped) const override;
- virtual double shaped_text_get_width(const RID &p_shaped) const override;
- virtual double shaped_text_get_underline_position(const RID &p_shaped) const override;
- virtual double shaped_text_get_underline_thickness(const RID &p_shaped) const override;
+ MODBIND1RC(Size2, shaped_text_get_size, const RID &);
+ MODBIND1RC(double, shaped_text_get_ascent, const RID &);
+ MODBIND1RC(double, shaped_text_get_descent, const RID &);
+ MODBIND1RC(double, shaped_text_get_width, const RID &);
+ MODBIND1RC(double, shaped_text_get_underline_position, const RID &);
+ MODBIND1RC(double, shaped_text_get_underline_thickness, const RID &);
- virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "") const override;
+ MODBIND2RC(PackedInt32Array, string_get_word_breaks, const String &, const String &);
- virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
- virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
+ MODBIND2RC(String, string_to_upper, const String &, const String &);
+ MODBIND2RC(String, string_to_lower, const String &, const String &);
TextServerFallback();
~TextServerFallback();
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp
index 7a8a298dbd..0e1069dcf4 100644
--- a/servers/text/text_server_extension.cpp
+++ b/servers/text/text_server_extension.cpp
@@ -31,288 +31,288 @@
#include "text_server_extension.h"
void TextServerExtension::_bind_methods() {
- GDVIRTUAL_BIND(has_feature, "feature");
- GDVIRTUAL_BIND(get_name);
- GDVIRTUAL_BIND(get_features);
+ GDVIRTUAL_BIND(_has_feature, "feature");
+ GDVIRTUAL_BIND(_get_name);
+ GDVIRTUAL_BIND(_get_features);
- GDVIRTUAL_BIND(free_rid, "rid");
- GDVIRTUAL_BIND(has, "rid");
- GDVIRTUAL_BIND(load_support_data, "filename");
+ GDVIRTUAL_BIND(_free_rid, "rid");
+ GDVIRTUAL_BIND(_has, "rid");
+ GDVIRTUAL_BIND(_load_support_data, "filename");
- GDVIRTUAL_BIND(get_support_data_filename);
- GDVIRTUAL_BIND(get_support_data_info);
- GDVIRTUAL_BIND(save_support_data, "filename");
+ GDVIRTUAL_BIND(_get_support_data_filename);
+ GDVIRTUAL_BIND(_get_support_data_info);
+ GDVIRTUAL_BIND(_save_support_data, "filename");
- GDVIRTUAL_BIND(is_locale_right_to_left, "locale");
+ GDVIRTUAL_BIND(_is_locale_right_to_left, "locale");
- GDVIRTUAL_BIND(name_to_tag, "name");
- GDVIRTUAL_BIND(tag_to_name, "tag");
+ GDVIRTUAL_BIND(_name_to_tag, "name");
+ GDVIRTUAL_BIND(_tag_to_name, "tag");
/* Font interface */
- GDVIRTUAL_BIND(create_font);
+ GDVIRTUAL_BIND(_create_font);
- GDVIRTUAL_BIND(font_set_data, "font_rid", "data");
- GDVIRTUAL_BIND(font_set_data_ptr, "font_rid", "data_ptr", "data_size");
+ 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_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_get_face_count, "font_rid");
- GDVIRTUAL_BIND(font_set_style, "font_rid", "style");
- GDVIRTUAL_BIND(font_get_style, "font_rid");
+ GDVIRTUAL_BIND(_font_set_style, "font_rid", "style");
+ GDVIRTUAL_BIND(_font_get_style, "font_rid");
- GDVIRTUAL_BIND(font_set_name, "font_rid", "name");
- GDVIRTUAL_BIND(font_get_name, "font_rid");
+ GDVIRTUAL_BIND(_font_set_name, "font_rid", "name");
+ GDVIRTUAL_BIND(_font_get_name, "font_rid");
- GDVIRTUAL_BIND(font_set_style_name, "font_rid", "name_style");
- GDVIRTUAL_BIND(font_get_style_name, "font_rid");
+ GDVIRTUAL_BIND(_font_set_style_name, "font_rid", "name_style");
+ GDVIRTUAL_BIND(_font_get_style_name, "font_rid");
- GDVIRTUAL_BIND(font_set_antialiasing, "font_rid", "antialiasing");
- GDVIRTUAL_BIND(font_get_antialiasing, "font_rid");
+ GDVIRTUAL_BIND(_font_set_antialiasing, "font_rid", "antialiasing");
+ GDVIRTUAL_BIND(_font_get_antialiasing, "font_rid");
- GDVIRTUAL_BIND(font_set_generate_mipmaps, "font_rid", "generate_mipmaps");
- GDVIRTUAL_BIND(font_get_generate_mipmaps, "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");
+ GDVIRTUAL_BIND(_font_set_multichannel_signed_distance_field, "font_rid", "msdf");
+ GDVIRTUAL_BIND(_font_is_multichannel_signed_distance_field, "font_rid");
- GDVIRTUAL_BIND(font_set_msdf_pixel_range, "font_rid", "msdf_pixel_range");
- GDVIRTUAL_BIND(font_get_msdf_pixel_range, "font_rid");
+ GDVIRTUAL_BIND(_font_set_msdf_pixel_range, "font_rid", "msdf_pixel_range");
+ GDVIRTUAL_BIND(_font_get_msdf_pixel_range, "font_rid");
- GDVIRTUAL_BIND(font_set_msdf_size, "font_rid", "msdf_size");
- GDVIRTUAL_BIND(font_get_msdf_size, "font_rid");
+ GDVIRTUAL_BIND(_font_set_msdf_size, "font_rid", "msdf_size");
+ GDVIRTUAL_BIND(_font_get_msdf_size, "font_rid");
- GDVIRTUAL_BIND(font_set_fixed_size, "font_rid", "fixed_size");
- GDVIRTUAL_BIND(font_get_fixed_size, "font_rid");
+ GDVIRTUAL_BIND(_font_set_fixed_size, "font_rid", "fixed_size");
+ GDVIRTUAL_BIND(_font_get_fixed_size, "font_rid");
- GDVIRTUAL_BIND(font_set_force_autohinter, "font_rid", "force_autohinter");
- GDVIRTUAL_BIND(font_is_force_autohinter, "font_rid");
+ GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");
+ GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");
- GDVIRTUAL_BIND(font_set_hinting, "font_rid", "hinting");
- GDVIRTUAL_BIND(font_get_hinting, "font_rid");
+ GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");
+ GDVIRTUAL_BIND(_font_get_hinting, "font_rid");
- GDVIRTUAL_BIND(font_set_subpixel_positioning, "font_rid", "subpixel_positioning");
- GDVIRTUAL_BIND(font_get_subpixel_positioning, "font_rid");
+ GDVIRTUAL_BIND(_font_set_subpixel_positioning, "font_rid", "subpixel_positioning");
+ GDVIRTUAL_BIND(_font_get_subpixel_positioning, "font_rid");
- GDVIRTUAL_BIND(font_set_embolden, "font_rid", "strength");
- GDVIRTUAL_BIND(font_get_embolden, "font_rid");
+ GDVIRTUAL_BIND(_font_set_embolden, "font_rid", "strength");
+ GDVIRTUAL_BIND(_font_get_embolden, "font_rid");
- GDVIRTUAL_BIND(font_set_transform, "font_rid", "transform");
- GDVIRTUAL_BIND(font_get_transform, "font_rid");
+ GDVIRTUAL_BIND(_font_set_transform, "font_rid", "transform");
+ GDVIRTUAL_BIND(_font_get_transform, "font_rid");
- GDVIRTUAL_BIND(font_set_variation_coordinates, "font_rid", "variation_coordinates");
- GDVIRTUAL_BIND(font_get_variation_coordinates, "font_rid");
+ GDVIRTUAL_BIND(_font_set_variation_coordinates, "font_rid", "variation_coordinates");
+ GDVIRTUAL_BIND(_font_get_variation_coordinates, "font_rid");
- GDVIRTUAL_BIND(font_set_oversampling, "font_rid", "oversampling");
- GDVIRTUAL_BIND(font_get_oversampling, "font_rid");
+ GDVIRTUAL_BIND(_font_set_oversampling, "font_rid", "oversampling");
+ GDVIRTUAL_BIND(_font_get_oversampling, "font_rid");
- GDVIRTUAL_BIND(font_get_size_cache_list, "font_rid");
- GDVIRTUAL_BIND(font_clear_size_cache, "font_rid");
- GDVIRTUAL_BIND(font_remove_size_cache, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_get_size_cache_list, "font_rid");
+ GDVIRTUAL_BIND(_font_clear_size_cache, "font_rid");
+ GDVIRTUAL_BIND(_font_remove_size_cache, "font_rid", "size");
- GDVIRTUAL_BIND(font_set_ascent, "font_rid", "size", "ascent");
- GDVIRTUAL_BIND(font_get_ascent, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_set_ascent, "font_rid", "size", "ascent");
+ GDVIRTUAL_BIND(_font_get_ascent, "font_rid", "size");
- GDVIRTUAL_BIND(font_set_descent, "font_rid", "size", "descent");
- GDVIRTUAL_BIND(font_get_descent, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_set_descent, "font_rid", "size", "descent");
+ GDVIRTUAL_BIND(_font_get_descent, "font_rid", "size");
- GDVIRTUAL_BIND(font_set_underline_position, "font_rid", "size", "underline_position");
- GDVIRTUAL_BIND(font_get_underline_position, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_set_underline_position, "font_rid", "size", "underline_position");
+ GDVIRTUAL_BIND(_font_get_underline_position, "font_rid", "size");
- GDVIRTUAL_BIND(font_set_underline_thickness, "font_rid", "size", "underline_thickness");
- GDVIRTUAL_BIND(font_get_underline_thickness, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_set_underline_thickness, "font_rid", "size", "underline_thickness");
+ GDVIRTUAL_BIND(_font_get_underline_thickness, "font_rid", "size");
- GDVIRTUAL_BIND(font_set_scale, "font_rid", "size", "scale");
- GDVIRTUAL_BIND(font_get_scale, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_set_scale, "font_rid", "size", "scale");
+ GDVIRTUAL_BIND(_font_get_scale, "font_rid", "size");
- GDVIRTUAL_BIND(font_get_texture_count, "font_rid", "size");
- GDVIRTUAL_BIND(font_clear_textures, "font_rid", "size");
- GDVIRTUAL_BIND(font_remove_texture, "font_rid", "size", "texture_index");
+ GDVIRTUAL_BIND(_font_get_texture_count, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_clear_textures, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_remove_texture, "font_rid", "size", "texture_index");
- GDVIRTUAL_BIND(font_set_texture_image, "font_rid", "size", "texture_index", "image");
- GDVIRTUAL_BIND(font_get_texture_image, "font_rid", "size", "texture_index");
+ GDVIRTUAL_BIND(_font_set_texture_image, "font_rid", "size", "texture_index", "image");
+ GDVIRTUAL_BIND(_font_get_texture_image, "font_rid", "size", "texture_index");
- GDVIRTUAL_BIND(font_set_texture_offsets, "font_rid", "size", "texture_index", "offset");
- GDVIRTUAL_BIND(font_get_texture_offsets, "font_rid", "size", "texture_index");
+ GDVIRTUAL_BIND(_font_set_texture_offsets, "font_rid", "size", "texture_index", "offset");
+ GDVIRTUAL_BIND(_font_get_texture_offsets, "font_rid", "size", "texture_index");
- GDVIRTUAL_BIND(font_get_glyph_list, "font_rid", "size");
- GDVIRTUAL_BIND(font_clear_glyphs, "font_rid", "size");
- GDVIRTUAL_BIND(font_remove_glyph, "font_rid", "size", "glyph");
+ GDVIRTUAL_BIND(_font_get_glyph_list, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_clear_glyphs, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_remove_glyph, "font_rid", "size", "glyph");
- GDVIRTUAL_BIND(font_get_glyph_advance, "font_rid", "size", "glyph");
- GDVIRTUAL_BIND(font_set_glyph_advance, "font_rid", "size", "glyph", "advance");
+ GDVIRTUAL_BIND(_font_get_glyph_advance, "font_rid", "size", "glyph");
+ GDVIRTUAL_BIND(_font_set_glyph_advance, "font_rid", "size", "glyph", "advance");
- GDVIRTUAL_BIND(font_get_glyph_offset, "font_rid", "size", "glyph");
- GDVIRTUAL_BIND(font_set_glyph_offset, "font_rid", "size", "glyph", "offset");
+ GDVIRTUAL_BIND(_font_get_glyph_offset, "font_rid", "size", "glyph");
+ GDVIRTUAL_BIND(_font_set_glyph_offset, "font_rid", "size", "glyph", "offset");
- GDVIRTUAL_BIND(font_get_glyph_size, "font_rid", "size", "glyph");
- GDVIRTUAL_BIND(font_set_glyph_size, "font_rid", "size", "glyph", "gl_size");
+ GDVIRTUAL_BIND(_font_get_glyph_size, "font_rid", "size", "glyph");
+ GDVIRTUAL_BIND(_font_set_glyph_size, "font_rid", "size", "glyph", "gl_size");
- GDVIRTUAL_BIND(font_get_glyph_uv_rect, "font_rid", "size", "glyph");
- GDVIRTUAL_BIND(font_set_glyph_uv_rect, "font_rid", "size", "glyph", "uv_rect");
+ GDVIRTUAL_BIND(_font_get_glyph_uv_rect, "font_rid", "size", "glyph");
+ GDVIRTUAL_BIND(_font_set_glyph_uv_rect, "font_rid", "size", "glyph", "uv_rect");
- 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_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_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_glyph_contours, "font_rid", "size", "index");
- GDVIRTUAL_BIND(font_get_kerning_list, "font_rid", "size");
- GDVIRTUAL_BIND(font_clear_kerning_map, "font_rid", "size");
- GDVIRTUAL_BIND(font_remove_kerning, "font_rid", "size", "glyph_pair");
+ GDVIRTUAL_BIND(_font_get_kerning_list, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_clear_kerning_map, "font_rid", "size");
+ GDVIRTUAL_BIND(_font_remove_kerning, "font_rid", "size", "glyph_pair");
- GDVIRTUAL_BIND(font_set_kerning, "font_rid", "size", "glyph_pair", "kerning");
- GDVIRTUAL_BIND(font_get_kerning, "font_rid", "size", "glyph_pair");
+ GDVIRTUAL_BIND(_font_set_kerning, "font_rid", "size", "glyph_pair", "kerning");
+ GDVIRTUAL_BIND(_font_get_kerning, "font_rid", "size", "glyph_pair");
- GDVIRTUAL_BIND(font_get_glyph_index, "font_rid", "size", "char", "variation_selector");
+ GDVIRTUAL_BIND(_font_get_glyph_index, "font_rid", "size", "char", "variation_selector");
- GDVIRTUAL_BIND(font_has_char, "font_rid", "char");
- GDVIRTUAL_BIND(font_get_supported_chars, "font_rid");
+ GDVIRTUAL_BIND(_font_has_char, "font_rid", "char");
+ GDVIRTUAL_BIND(_font_get_supported_chars, "font_rid");
- GDVIRTUAL_BIND(font_render_range, "font_rid", "size", "start", "end");
- GDVIRTUAL_BIND(font_render_glyph, "font_rid", "size", "index");
+ GDVIRTUAL_BIND(_font_render_range, "font_rid", "size", "start", "end");
+ GDVIRTUAL_BIND(_font_render_glyph, "font_rid", "size", "index");
- GDVIRTUAL_BIND(font_draw_glyph, "font_rid", "canvas", "size", "pos", "index", "color");
- GDVIRTUAL_BIND(font_draw_glyph_outline, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color");
+ GDVIRTUAL_BIND(_font_draw_glyph, "font_rid", "canvas", "size", "pos", "index", "color");
+ GDVIRTUAL_BIND(_font_draw_glyph_outline, "font_rid", "canvas", "size", "outline_size", "pos", "index", "color");
- GDVIRTUAL_BIND(font_is_language_supported, "font_rid", "language");
- GDVIRTUAL_BIND(font_set_language_support_override, "font_rid", "language", "supported");
- GDVIRTUAL_BIND(font_get_language_support_override, "font_rid", "language");
- GDVIRTUAL_BIND(font_remove_language_support_override, "font_rid", "language");
- GDVIRTUAL_BIND(font_get_language_support_overrides, "font_rid");
+ GDVIRTUAL_BIND(_font_is_language_supported, "font_rid", "language");
+ GDVIRTUAL_BIND(_font_set_language_support_override, "font_rid", "language", "supported");
+ GDVIRTUAL_BIND(_font_get_language_support_override, "font_rid", "language");
+ GDVIRTUAL_BIND(_font_remove_language_support_override, "font_rid", "language");
+ GDVIRTUAL_BIND(_font_get_language_support_overrides, "font_rid");
- GDVIRTUAL_BIND(font_is_script_supported, "font_rid", "script");
- GDVIRTUAL_BIND(font_set_script_support_override, "font_rid", "script", "supported");
- GDVIRTUAL_BIND(font_get_script_support_override, "font_rid", "script");
- GDVIRTUAL_BIND(font_remove_script_support_override, "font_rid", "script");
- GDVIRTUAL_BIND(font_get_script_support_overrides, "font_rid");
+ GDVIRTUAL_BIND(_font_is_script_supported, "font_rid", "script");
+ GDVIRTUAL_BIND(_font_set_script_support_override, "font_rid", "script", "supported");
+ GDVIRTUAL_BIND(_font_get_script_support_override, "font_rid", "script");
+ 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_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");
+ GDVIRTUAL_BIND(_font_supported_feature_list, "font_rid");
+ GDVIRTUAL_BIND(_font_supported_variation_list, "font_rid");
- GDVIRTUAL_BIND(font_get_global_oversampling);
- GDVIRTUAL_BIND(font_set_global_oversampling, "oversampling");
+ GDVIRTUAL_BIND(_font_get_global_oversampling);
+ GDVIRTUAL_BIND(_font_set_global_oversampling, "oversampling");
- GDVIRTUAL_BIND(get_hex_code_box_size, "size", "index");
- GDVIRTUAL_BIND(draw_hex_code_box, "canvas", "size", "pos", "index", "color");
+ GDVIRTUAL_BIND(_get_hex_code_box_size, "size", "index");
+ GDVIRTUAL_BIND(_draw_hex_code_box, "canvas", "size", "pos", "index", "color");
/* Shaped text buffer interface */
- GDVIRTUAL_BIND(create_shaped_text, "direction", "orientation");
+ GDVIRTUAL_BIND(_create_shaped_text, "direction", "orientation");
- GDVIRTUAL_BIND(shaped_text_clear, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_clear, "shaped");
- 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_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");
+ GDVIRTUAL_BIND(_shaped_text_set_bidi_override, "shaped", "override");
- GDVIRTUAL_BIND(shaped_text_set_custom_punctuation, "shaped", "punct");
- GDVIRTUAL_BIND(shaped_text_get_custom_punctuation, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_set_custom_punctuation, "shaped", "punct");
+ GDVIRTUAL_BIND(_shaped_text_get_custom_punctuation, "shaped");
- GDVIRTUAL_BIND(shaped_text_set_orientation, "shaped", "orientation");
- GDVIRTUAL_BIND(shaped_text_get_orientation, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_set_orientation, "shaped", "orientation");
+ GDVIRTUAL_BIND(_shaped_text_get_orientation, "shaped");
- GDVIRTUAL_BIND(shaped_text_set_preserve_invalid, "shaped", "enabled");
- GDVIRTUAL_BIND(shaped_text_get_preserve_invalid, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_set_preserve_invalid, "shaped", "enabled");
+ GDVIRTUAL_BIND(_shaped_text_get_preserve_invalid, "shaped");
- GDVIRTUAL_BIND(shaped_text_set_preserve_control, "shaped", "enabled");
- GDVIRTUAL_BIND(shaped_text_get_preserve_control, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_set_preserve_control, "shaped", "enabled");
+ GDVIRTUAL_BIND(_shaped_text_get_preserve_control, "shaped");
- GDVIRTUAL_BIND(shaped_text_set_spacing, "shaped", "spacing", "value");
- GDVIRTUAL_BIND(shaped_text_get_spacing, "shaped", "spacing");
+ GDVIRTUAL_BIND(_shaped_text_set_spacing, "shaped", "spacing", "value");
+ GDVIRTUAL_BIND(_shaped_text_get_spacing, "shaped", "spacing");
- GDVIRTUAL_BIND(shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");
- GDVIRTUAL_BIND(shaped_text_add_object, "shaped", "key", "size", "inline_align", "length");
- GDVIRTUAL_BIND(shaped_text_resize_object, "shaped", "key", "size", "inline_align");
+ GDVIRTUAL_BIND(_shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");
+ GDVIRTUAL_BIND(_shaped_text_add_object, "shaped", "key", "size", "inline_align", "length");
+ GDVIRTUAL_BIND(_shaped_text_resize_object, "shaped", "key", "size", "inline_align");
- GDVIRTUAL_BIND(shaped_get_span_count, "shaped");
- GDVIRTUAL_BIND(shaped_get_span_meta, "shaped", "index");
- GDVIRTUAL_BIND(shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");
+ GDVIRTUAL_BIND(_shaped_get_span_count, "shaped");
+ GDVIRTUAL_BIND(_shaped_get_span_meta, "shaped", "index");
+ GDVIRTUAL_BIND(_shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");
- GDVIRTUAL_BIND(shaped_text_substr, "shaped", "start", "length");
- GDVIRTUAL_BIND(shaped_text_get_parent, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_substr, "shaped", "start", "length");
+ GDVIRTUAL_BIND(_shaped_text_get_parent, "shaped");
- GDVIRTUAL_BIND(shaped_text_fit_to_width, "shaped", "width", "jst_flags");
- GDVIRTUAL_BIND(shaped_text_tab_align, "shaped", "tab_stops");
+ GDVIRTUAL_BIND(_shaped_text_fit_to_width, "shaped", "width", "jst_flags");
+ GDVIRTUAL_BIND(_shaped_text_tab_align, "shaped", "tab_stops");
- GDVIRTUAL_BIND(shaped_text_shape, "shaped");
- GDVIRTUAL_BIND(shaped_text_update_breaks, "shaped");
- GDVIRTUAL_BIND(shaped_text_update_justification_ops, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_shape, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_update_breaks, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_update_justification_ops, "shaped");
- GDVIRTUAL_BIND(shaped_text_is_ready, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_is_ready, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_glyphs, "shaped");
- GDVIRTUAL_BIND(shaped_text_sort_logical, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_glyph_count, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_glyphs, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_sort_logical, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_glyph_count, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_range, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_range, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_line_breaks_adv, "shaped", "width", "start", "once", "break_flags");
- GDVIRTUAL_BIND(shaped_text_get_line_breaks, "shaped", "width", "start", "break_flags");
- GDVIRTUAL_BIND(shaped_text_get_word_breaks, "shaped", "grapheme_flags");
+ GDVIRTUAL_BIND(_shaped_text_get_line_breaks_adv, "shaped", "width", "start", "once", "break_flags");
+ GDVIRTUAL_BIND(_shaped_text_get_line_breaks, "shaped", "width", "start", "break_flags");
+ GDVIRTUAL_BIND(_shaped_text_get_word_breaks, "shaped", "grapheme_flags");
- GDVIRTUAL_BIND(shaped_text_get_trim_pos, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_ellipsis_pos, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_ellipsis_glyph_count, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_ellipsis_glyphs, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_trim_pos, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_ellipsis_pos, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyph_count, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_ellipsis_glyphs, "shaped");
- GDVIRTUAL_BIND(shaped_text_overrun_trim_to_width, "shaped", "width", "trim_flags");
+ GDVIRTUAL_BIND(_shaped_text_overrun_trim_to_width, "shaped", "width", "trim_flags");
- GDVIRTUAL_BIND(shaped_text_get_objects, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_object_rect, "shaped", "key");
+ GDVIRTUAL_BIND(_shaped_text_get_objects, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_object_rect, "shaped", "key");
- GDVIRTUAL_BIND(shaped_text_get_size, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_ascent, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_descent, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_width, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_underline_position, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_underline_thickness, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_size, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_ascent, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_descent, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_width, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_underline_position, "shaped");
+ GDVIRTUAL_BIND(_shaped_text_get_underline_thickness, "shaped");
- GDVIRTUAL_BIND(shaped_text_get_dominant_direction_in_range, "shaped", "start", "end");
+ GDVIRTUAL_BIND(_shaped_text_get_dominant_direction_in_range, "shaped", "start", "end");
- GDVIRTUAL_BIND(shaped_text_get_carets, "shaped", "position", "caret");
- GDVIRTUAL_BIND(shaped_text_get_selection, "shaped", "start", "end");
+ GDVIRTUAL_BIND(_shaped_text_get_carets, "shaped", "position", "caret");
+ GDVIRTUAL_BIND(_shaped_text_get_selection, "shaped", "start", "end");
- GDVIRTUAL_BIND(shaped_text_hit_test_grapheme, "shaped", "coord");
- GDVIRTUAL_BIND(shaped_text_hit_test_position, "shaped", "coord");
+ GDVIRTUAL_BIND(_shaped_text_hit_test_grapheme, "shaped", "coord");
+ GDVIRTUAL_BIND(_shaped_text_hit_test_position, "shaped", "coord");
- 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_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");
+ 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");
- GDVIRTUAL_BIND(format_number, "string", "language");
- GDVIRTUAL_BIND(parse_number, "string", "language");
- GDVIRTUAL_BIND(percent_sign, "language");
+ GDVIRTUAL_BIND(_format_number, "string", "language");
+ GDVIRTUAL_BIND(_parse_number, "string", "language");
+ GDVIRTUAL_BIND(_percent_sign, "language");
- GDVIRTUAL_BIND(strip_diacritics, "string");
- GDVIRTUAL_BIND(is_valid_identifier, "string");
+ GDVIRTUAL_BIND(_strip_diacritics, "string");
+ GDVIRTUAL_BIND(_is_valid_identifier, "string");
- GDVIRTUAL_BIND(string_get_word_breaks, "string", "language");
+ GDVIRTUAL_BIND(_string_get_word_breaks, "string", "language");
- GDVIRTUAL_BIND(is_confusable, "string", "dict");
- GDVIRTUAL_BIND(spoof_check, "string");
+ GDVIRTUAL_BIND(_is_confusable, "string", "dict");
+ GDVIRTUAL_BIND(_spoof_check, "string");
- GDVIRTUAL_BIND(string_to_upper, "string", "language");
- GDVIRTUAL_BIND(string_to_lower, "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");
+ GDVIRTUAL_BIND(_parse_structured_text, "parser_type", "args", "text");
}
bool TextServerExtension::has_feature(Feature p_feature) const {
bool ret;
- if (GDVIRTUAL_CALL(has_feature, p_feature, ret)) {
+ if (GDVIRTUAL_CALL(_has_feature, p_feature, ret)) {
return ret;
}
return false;
@@ -320,7 +320,7 @@ bool TextServerExtension::has_feature(Feature p_feature) const {
String TextServerExtension::get_name() const {
String ret;
- if (GDVIRTUAL_CALL(get_name, ret)) {
+ if (GDVIRTUAL_CALL(_get_name, ret)) {
return ret;
}
return "Unknown";
@@ -328,19 +328,19 @@ String TextServerExtension::get_name() const {
int64_t TextServerExtension::get_features() const {
int64_t ret;
- if (GDVIRTUAL_CALL(get_features, ret)) {
+ if (GDVIRTUAL_CALL(_get_features, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::free_rid(const RID &p_rid) {
- GDVIRTUAL_CALL(free_rid, p_rid);
+ GDVIRTUAL_CALL(_free_rid, p_rid);
}
bool TextServerExtension::has(const RID &p_rid) {
bool ret;
- if (GDVIRTUAL_CALL(has, p_rid, ret)) {
+ if (GDVIRTUAL_CALL(_has, p_rid, ret)) {
return ret;
}
return false;
@@ -348,7 +348,7 @@ bool TextServerExtension::has(const RID &p_rid) {
bool TextServerExtension::load_support_data(const String &p_filename) {
bool ret;
- if (GDVIRTUAL_CALL(load_support_data, p_filename, ret)) {
+ if (GDVIRTUAL_CALL(_load_support_data, p_filename, ret)) {
return ret;
}
return false;
@@ -356,7 +356,7 @@ bool TextServerExtension::load_support_data(const String &p_filename) {
String TextServerExtension::get_support_data_filename() const {
String ret;
- if (GDVIRTUAL_CALL(get_support_data_filename, ret)) {
+ if (GDVIRTUAL_CALL(_get_support_data_filename, ret)) {
return ret;
}
return String();
@@ -364,7 +364,7 @@ String TextServerExtension::get_support_data_filename() const {
String TextServerExtension::get_support_data_info() const {
String ret;
- if (GDVIRTUAL_CALL(get_support_data_info, ret)) {
+ if (GDVIRTUAL_CALL(_get_support_data_info, ret)) {
return ret;
}
return String();
@@ -372,7 +372,7 @@ String TextServerExtension::get_support_data_info() const {
bool TextServerExtension::save_support_data(const String &p_filename) const {
bool ret;
- if (GDVIRTUAL_CALL(save_support_data, p_filename, ret)) {
+ if (GDVIRTUAL_CALL(_save_support_data, p_filename, ret)) {
return ret;
}
return false;
@@ -380,7 +380,7 @@ bool TextServerExtension::save_support_data(const String &p_filename) const {
bool TextServerExtension::is_locale_right_to_left(const String &p_locale) const {
bool ret;
- if (GDVIRTUAL_CALL(is_locale_right_to_left, p_locale, ret)) {
+ if (GDVIRTUAL_CALL(_is_locale_right_to_left, p_locale, ret)) {
return ret;
}
return false;
@@ -388,7 +388,7 @@ bool TextServerExtension::is_locale_right_to_left(const String &p_locale) const
int64_t TextServerExtension::name_to_tag(const String &p_name) const {
int64_t ret;
- if (GDVIRTUAL_CALL(name_to_tag, p_name, ret)) {
+ if (GDVIRTUAL_CALL(_name_to_tag, p_name, ret)) {
return ret;
}
return 0;
@@ -396,7 +396,7 @@ int64_t TextServerExtension::name_to_tag(const String &p_name) const {
String TextServerExtension::tag_to_name(int64_t p_tag) const {
String ret;
- if (GDVIRTUAL_CALL(tag_to_name, p_tag, ret)) {
+ if (GDVIRTUAL_CALL(_tag_to_name, p_tag, ret)) {
return ret;
}
return "";
@@ -408,27 +408,27 @@ String TextServerExtension::tag_to_name(int64_t p_tag) const {
RID TextServerExtension::create_font() {
RID ret;
- if (GDVIRTUAL_CALL(create_font, ret)) {
+ if (GDVIRTUAL_CALL(_create_font, ret)) {
return ret;
}
return RID();
}
void TextServerExtension::font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) {
- GDVIRTUAL_CALL(font_set_data, p_font_rid, p_data);
+ GDVIRTUAL_CALL(_font_set_data, p_font_rid, p_data);
}
void TextServerExtension::font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) {
- GDVIRTUAL_CALL(font_set_data_ptr, p_font_rid, p_data_ptr, p_data_size);
+ 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);
+ 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)) {
+ if (GDVIRTUAL_CALL(_font_get_face_index, p_font_rid, ret)) {
return ret;
}
return 0;
@@ -436,199 +436,199 @@ int64_t TextServerExtension::font_get_face_index(const RID &p_font_rid) const {
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)) {
+ 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, BitField<TextServer::FontStyle> p_style) {
- GDVIRTUAL_CALL(font_set_style, p_font_rid, p_style);
+ GDVIRTUAL_CALL(_font_set_style, p_font_rid, p_style);
}
BitField<TextServer::FontStyle> TextServerExtension::font_get_style(const RID &p_font_rid) const {
BitField<TextServer::FontStyle> ret = 0;
- if (GDVIRTUAL_CALL(font_get_style, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_style, p_font_rid, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::font_set_style_name(const RID &p_font_rid, const String &p_name) {
- GDVIRTUAL_CALL(font_set_style_name, p_font_rid, p_name);
+ GDVIRTUAL_CALL(_font_set_style_name, p_font_rid, p_name);
}
String TextServerExtension::font_get_style_name(const RID &p_font_rid) const {
String ret;
- if (GDVIRTUAL_CALL(font_get_style_name, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_style_name, p_font_rid, ret)) {
return ret;
}
return String();
}
void TextServerExtension::font_set_name(const RID &p_font_rid, const String &p_name) {
- GDVIRTUAL_CALL(font_set_name, p_font_rid, p_name);
+ GDVIRTUAL_CALL(_font_set_name, p_font_rid, p_name);
}
String TextServerExtension::font_get_name(const RID &p_font_rid) const {
String ret;
- if (GDVIRTUAL_CALL(font_get_name, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_name, p_font_rid, ret)) {
return ret;
}
return String();
}
-void TextServerExtension::font_set_antialiasing(RID p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
- GDVIRTUAL_CALL(font_set_antialiasing, p_font_rid, p_antialiasing);
+void TextServerExtension::font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {
+ GDVIRTUAL_CALL(_font_set_antialiasing, p_font_rid, p_antialiasing);
}
-TextServer::FontAntialiasing TextServerExtension::font_get_antialiasing(RID p_font_rid) const {
+TextServer::FontAntialiasing TextServerExtension::font_get_antialiasing(const RID &p_font_rid) const {
TextServer::FontAntialiasing ret;
- if (GDVIRTUAL_CALL(font_get_antialiasing, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_antialiasing, p_font_rid, ret)) {
return ret;
}
return TextServer::FONT_ANTIALIASING_NONE;
}
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);
+ 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)) {
+ 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);
+ GDVIRTUAL_CALL(_font_set_multichannel_signed_distance_field, p_font_rid, p_msdf);
}
bool TextServerExtension::font_is_multichannel_signed_distance_field(const RID &p_font_rid) const {
bool ret;
- if (GDVIRTUAL_CALL(font_is_multichannel_signed_distance_field, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_is_multichannel_signed_distance_field, p_font_rid, ret)) {
return ret;
}
return false;
}
void TextServerExtension::font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) {
- GDVIRTUAL_CALL(font_set_msdf_pixel_range, p_font_rid, p_msdf_pixel_range);
+ GDVIRTUAL_CALL(_font_set_msdf_pixel_range, p_font_rid, p_msdf_pixel_range);
}
int64_t TextServerExtension::font_get_msdf_pixel_range(const RID &p_font_rid) const {
int64_t ret;
- if (GDVIRTUAL_CALL(font_get_msdf_pixel_range, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_msdf_pixel_range, p_font_rid, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) {
- GDVIRTUAL_CALL(font_set_msdf_size, p_font_rid, p_msdf_size);
+ GDVIRTUAL_CALL(_font_set_msdf_size, p_font_rid, p_msdf_size);
}
int64_t TextServerExtension::font_get_msdf_size(const RID &p_font_rid) const {
int64_t ret;
- if (GDVIRTUAL_CALL(font_get_msdf_size, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_msdf_size, p_font_rid, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) {
- GDVIRTUAL_CALL(font_set_fixed_size, p_font_rid, p_fixed_size);
+ GDVIRTUAL_CALL(_font_set_fixed_size, p_font_rid, p_fixed_size);
}
int64_t TextServerExtension::font_get_fixed_size(const RID &p_font_rid) const {
int64_t ret;
- if (GDVIRTUAL_CALL(font_get_fixed_size, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_fixed_size, p_font_rid, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) {
- GDVIRTUAL_CALL(font_set_force_autohinter, p_font_rid, p_force_autohinter);
+ GDVIRTUAL_CALL(_font_set_force_autohinter, p_font_rid, p_force_autohinter);
}
bool TextServerExtension::font_is_force_autohinter(const RID &p_font_rid) const {
bool ret;
- if (GDVIRTUAL_CALL(font_is_force_autohinter, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_is_force_autohinter, p_font_rid, ret)) {
return ret;
}
return false;
}
void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
- GDVIRTUAL_CALL(font_set_hinting, p_font_rid, p_hinting);
+ GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);
}
TextServer::Hinting TextServerExtension::font_get_hinting(const RID &p_font_rid) const {
TextServer::Hinting ret;
- if (GDVIRTUAL_CALL(font_get_hinting, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_hinting, p_font_rid, ret)) {
return (TextServer::Hinting)ret;
}
return TextServer::Hinting::HINTING_NONE;
}
void TextServerExtension::font_set_subpixel_positioning(const RID &p_font_rid, TextServer::SubpixelPositioning p_subpixel) {
- GDVIRTUAL_CALL(font_set_subpixel_positioning, p_font_rid, p_subpixel);
+ GDVIRTUAL_CALL(_font_set_subpixel_positioning, p_font_rid, p_subpixel);
}
TextServer::SubpixelPositioning TextServerExtension::font_get_subpixel_positioning(const RID &p_font_rid) const {
TextServer::SubpixelPositioning ret;
- if (GDVIRTUAL_CALL(font_get_subpixel_positioning, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_subpixel_positioning, p_font_rid, ret)) {
return (TextServer::SubpixelPositioning)ret;
}
return TextServer::SubpixelPositioning::SUBPIXEL_POSITIONING_DISABLED;
}
void TextServerExtension::font_set_embolden(const RID &p_font_rid, double p_strength) {
- GDVIRTUAL_CALL(font_set_embolden, p_font_rid, p_strength);
+ GDVIRTUAL_CALL(_font_set_embolden, p_font_rid, p_strength);
}
double TextServerExtension::font_get_embolden(const RID &p_font_rid) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_embolden, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_embolden, p_font_rid, ret)) {
return ret;
}
return 0.0;
}
void TextServerExtension::font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
- GDVIRTUAL_CALL(font_set_transform, p_font_rid, p_transform);
+ GDVIRTUAL_CALL(_font_set_transform, p_font_rid, p_transform);
}
Transform2D TextServerExtension::font_get_transform(const RID &p_font_rid) const {
Transform2D ret;
- if (GDVIRTUAL_CALL(font_get_transform, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_transform, p_font_rid, ret)) {
return ret;
}
return Transform2D();
}
void TextServerExtension::font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) {
- GDVIRTUAL_CALL(font_set_variation_coordinates, p_font_rid, p_variation_coordinates);
+ GDVIRTUAL_CALL(_font_set_variation_coordinates, p_font_rid, p_variation_coordinates);
}
Dictionary TextServerExtension::font_get_variation_coordinates(const RID &p_font_rid) const {
Dictionary ret;
- if (GDVIRTUAL_CALL(font_get_variation_coordinates, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_variation_coordinates, p_font_rid, ret)) {
return ret;
}
return Dictionary();
}
void TextServerExtension::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
- GDVIRTUAL_CALL(font_set_oversampling, p_font_rid, p_oversampling);
+ GDVIRTUAL_CALL(_font_set_oversampling, p_font_rid, p_oversampling);
}
double TextServerExtension::font_get_oversampling(const RID &p_font_rid) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_oversampling, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_oversampling, p_font_rid, ret)) {
return ret;
}
return 0.0;
@@ -636,75 +636,75 @@ double TextServerExtension::font_get_oversampling(const RID &p_font_rid) const {
TypedArray<Vector2i> TextServerExtension::font_get_size_cache_list(const RID &p_font_rid) const {
TypedArray<Vector2i> ret;
- if (GDVIRTUAL_CALL(font_get_size_cache_list, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_size_cache_list, p_font_rid, ret)) {
return ret;
}
return TypedArray<Vector2i>();
}
void TextServerExtension::font_clear_size_cache(const RID &p_font_rid) {
- GDVIRTUAL_CALL(font_clear_size_cache, p_font_rid);
+ GDVIRTUAL_CALL(_font_clear_size_cache, p_font_rid);
}
void TextServerExtension::font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) {
- GDVIRTUAL_CALL(font_remove_size_cache, p_font_rid, p_size);
+ GDVIRTUAL_CALL(_font_remove_size_cache, p_font_rid, p_size);
}
void TextServerExtension::font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) {
- GDVIRTUAL_CALL(font_set_ascent, p_font_rid, p_size, p_ascent);
+ GDVIRTUAL_CALL(_font_set_ascent, p_font_rid, p_size, p_ascent);
}
double TextServerExtension::font_get_ascent(const RID &p_font_rid, int64_t p_size) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_ascent, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_ascent, p_font_rid, p_size, ret)) {
return ret;
}
return 0.0;
}
void TextServerExtension::font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) {
- GDVIRTUAL_CALL(font_set_descent, p_font_rid, p_size, p_descent);
+ GDVIRTUAL_CALL(_font_set_descent, p_font_rid, p_size, p_descent);
}
double TextServerExtension::font_get_descent(const RID &p_font_rid, int64_t p_size) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_descent, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_descent, p_font_rid, p_size, ret)) {
return ret;
}
return 0.0;
}
void TextServerExtension::font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) {
- GDVIRTUAL_CALL(font_set_underline_position, p_font_rid, p_size, p_underline_position);
+ GDVIRTUAL_CALL(_font_set_underline_position, p_font_rid, p_size, p_underline_position);
}
double TextServerExtension::font_get_underline_position(const RID &p_font_rid, int64_t p_size) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_underline_position, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_underline_position, p_font_rid, p_size, ret)) {
return ret;
}
return 0.0;
}
void TextServerExtension::font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) {
- GDVIRTUAL_CALL(font_set_underline_thickness, p_font_rid, p_size, p_underline_thickness);
+ GDVIRTUAL_CALL(_font_set_underline_thickness, p_font_rid, p_size, p_underline_thickness);
}
double TextServerExtension::font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_underline_thickness, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_underline_thickness, p_font_rid, p_size, ret)) {
return ret;
}
return 0.0;
}
void TextServerExtension::font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) {
- GDVIRTUAL_CALL(font_set_scale, p_font_rid, p_size, p_scale);
+ GDVIRTUAL_CALL(_font_set_scale, p_font_rid, p_size, p_scale);
}
double TextServerExtension::font_get_scale(const RID &p_font_rid, int64_t p_size) const {
double ret;
- if (GDVIRTUAL_CALL(font_get_scale, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_scale, p_font_rid, p_size, ret)) {
return ret;
}
return 0.0;
@@ -712,39 +712,39 @@ double TextServerExtension::font_get_scale(const RID &p_font_rid, int64_t p_size
int64_t TextServerExtension::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
int64_t ret;
- if (GDVIRTUAL_CALL(font_get_texture_count, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_texture_count, p_font_rid, p_size, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) {
- GDVIRTUAL_CALL(font_clear_textures, p_font_rid, p_size);
+ GDVIRTUAL_CALL(_font_clear_textures, p_font_rid, p_size);
}
void TextServerExtension::font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) {
- GDVIRTUAL_CALL(font_remove_texture, p_font_rid, p_size, p_texture_index);
+ GDVIRTUAL_CALL(_font_remove_texture, p_font_rid, p_size, p_texture_index);
}
void TextServerExtension::font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) {
- GDVIRTUAL_CALL(font_set_texture_image, p_font_rid, p_size, p_texture_index, p_image);
+ GDVIRTUAL_CALL(_font_set_texture_image, p_font_rid, p_size, p_texture_index, p_image);
}
Ref<Image> TextServerExtension::font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
Ref<Image> ret;
- if (GDVIRTUAL_CALL(font_get_texture_image, p_font_rid, p_size, p_texture_index, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_texture_image, p_font_rid, p_size, p_texture_index, ret)) {
return ret;
}
return Ref<Image>();
}
void TextServerExtension::font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) {
- GDVIRTUAL_CALL(font_set_texture_offsets, p_font_rid, p_size, p_texture_index, p_offset);
+ GDVIRTUAL_CALL(_font_set_texture_offsets, p_font_rid, p_size, p_texture_index, p_offset);
}
PackedInt32Array TextServerExtension::font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const {
PackedInt32Array ret;
- if (GDVIRTUAL_CALL(font_get_texture_offsets, p_font_rid, p_size, p_texture_index, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_texture_offsets, p_font_rid, p_size, p_texture_index, ret)) {
return ret;
}
return PackedInt32Array();
@@ -752,83 +752,83 @@ PackedInt32Array TextServerExtension::font_get_texture_offsets(const RID &p_font
PackedInt32Array TextServerExtension::font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const {
PackedInt32Array ret;
- if (GDVIRTUAL_CALL(font_get_glyph_list, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_list, p_font_rid, p_size, ret)) {
return ret;
}
return PackedInt32Array();
}
void TextServerExtension::font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) {
- GDVIRTUAL_CALL(font_clear_glyphs, p_font_rid, p_size);
+ GDVIRTUAL_CALL(_font_clear_glyphs, p_font_rid, p_size);
}
void TextServerExtension::font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) {
- GDVIRTUAL_CALL(font_remove_glyph, p_font_rid, p_size, p_glyph);
+ GDVIRTUAL_CALL(_font_remove_glyph, p_font_rid, p_size, p_glyph);
}
Vector2 TextServerExtension::font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const {
Vector2 ret;
- if (GDVIRTUAL_CALL(font_get_glyph_advance, p_font_rid, p_size, p_glyph, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_advance, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return Vector2();
}
void TextServerExtension::font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) {
- GDVIRTUAL_CALL(font_set_glyph_advance, p_font_rid, p_size, p_glyph, p_advance);
+ GDVIRTUAL_CALL(_font_set_glyph_advance, p_font_rid, p_size, p_glyph, p_advance);
}
Vector2 TextServerExtension::font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
Vector2 ret;
- if (GDVIRTUAL_CALL(font_get_glyph_offset, p_font_rid, p_size, p_glyph, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_offset, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return Vector2();
}
void TextServerExtension::font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) {
- GDVIRTUAL_CALL(font_set_glyph_offset, p_font_rid, p_size, p_glyph, p_offset);
+ GDVIRTUAL_CALL(_font_set_glyph_offset, p_font_rid, p_size, p_glyph, p_offset);
}
Vector2 TextServerExtension::font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
Vector2 ret;
- if (GDVIRTUAL_CALL(font_get_glyph_size, p_font_rid, p_size, p_glyph, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_size, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return Vector2();
}
void TextServerExtension::font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) {
- GDVIRTUAL_CALL(font_set_glyph_size, p_font_rid, p_size, p_glyph, p_gl_size);
+ GDVIRTUAL_CALL(_font_set_glyph_size, p_font_rid, p_size, p_glyph, p_gl_size);
}
Rect2 TextServerExtension::font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
Rect2 ret;
- if (GDVIRTUAL_CALL(font_get_glyph_uv_rect, p_font_rid, p_size, p_glyph, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_uv_rect, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return Rect2();
}
void TextServerExtension::font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) {
- GDVIRTUAL_CALL(font_set_glyph_uv_rect, p_font_rid, p_size, p_glyph, p_uv_rect);
+ GDVIRTUAL_CALL(_font_set_glyph_uv_rect, p_font_rid, p_size, p_glyph, p_uv_rect);
}
int64_t TextServerExtension::font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const {
int64_t ret;
- if (GDVIRTUAL_CALL(font_get_glyph_texture_idx, p_font_rid, p_size, p_glyph, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_texture_idx, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return 0;
}
void TextServerExtension::font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) {
- GDVIRTUAL_CALL(font_set_glyph_texture_idx, p_font_rid, p_size, p_glyph, p_texture_idx);
+ 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)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_texture_rid, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return RID();
@@ -836,7 +836,7 @@ RID TextServerExtension::font_get_glyph_texture_rid(const RID &p_font_rid, const
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)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_texture_size, p_font_rid, p_size, p_glyph, ret)) {
return ret;
}
return Size2();
@@ -844,7 +844,7 @@ Size2 TextServerExtension::font_get_glyph_texture_size(const RID &p_font_rid, co
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)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_contours, p_font_rid, p_size, p_index, ret)) {
return ret;
}
return Dictionary();
@@ -852,27 +852,27 @@ Dictionary TextServerExtension::font_get_glyph_contours(const RID &p_font_rid, i
TypedArray<Vector2i> TextServerExtension::font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const {
TypedArray<Vector2i> ret;
- if (GDVIRTUAL_CALL(font_get_kerning_list, p_font_rid, p_size, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_kerning_list, p_font_rid, p_size, ret)) {
return ret;
}
return TypedArray<Vector2i>();
}
void TextServerExtension::font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) {
- GDVIRTUAL_CALL(font_clear_kerning_map, p_font_rid, p_size);
+ GDVIRTUAL_CALL(_font_clear_kerning_map, p_font_rid, p_size);
}
void TextServerExtension::font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) {
- GDVIRTUAL_CALL(font_remove_kerning, p_font_rid, p_size, p_glyph_pair);
+ GDVIRTUAL_CALL(_font_remove_kerning, p_font_rid, p_size, p_glyph_pair);
}
void TextServerExtension::font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
- GDVIRTUAL_CALL(font_set_kerning, p_font_rid, p_size, p_glyph_pair, p_kerning);
+ GDVIRTUAL_CALL(_font_set_kerning, p_font_rid, p_size, p_glyph_pair, p_kerning);
}
Vector2 TextServerExtension::font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const {
Vector2 ret;
- if (GDVIRTUAL_CALL(font_get_kerning, p_font_rid, p_size, p_glyph_pair, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_kerning, p_font_rid, p_size, p_glyph_pair, ret)) {
return ret;
}
return Vector2();
@@ -880,7 +880,7 @@ Vector2 TextServerExtension::font_get_kerning(const RID &p_font_rid, int64_t p_s
int64_t TextServerExtension::font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector) const {
int64_t ret;
- if (GDVIRTUAL_CALL(font_get_glyph_index, p_font_rid, p_size, p_char, p_variation_selector, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_glyph_index, p_font_rid, p_size, p_char, p_variation_selector, ret)) {
return ret;
}
return 0;
@@ -888,7 +888,7 @@ int64_t TextServerExtension::font_get_glyph_index(const RID &p_font_rid, int64_t
bool TextServerExtension::font_has_char(const RID &p_font_rid, int64_t p_char) const {
bool ret;
- if (GDVIRTUAL_CALL(font_has_char, p_font_rid, p_char, ret)) {
+ if (GDVIRTUAL_CALL(_font_has_char, p_font_rid, p_char, ret)) {
return ret;
}
return false;
@@ -896,55 +896,55 @@ bool TextServerExtension::font_has_char(const RID &p_font_rid, int64_t p_char) c
String TextServerExtension::font_get_supported_chars(const RID &p_font_rid) const {
String ret;
- if (GDVIRTUAL_CALL(font_get_supported_chars, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_supported_chars, p_font_rid, ret)) {
return ret;
}
return String();
}
void TextServerExtension::font_render_range(const RID &p_font_rid, const Vector2i &p_size, int64_t p_start, int64_t p_end) {
- GDVIRTUAL_CALL(font_render_range, p_font_rid, p_size, p_start, p_end);
+ GDVIRTUAL_CALL(_font_render_range, p_font_rid, p_size, p_start, p_end);
}
void TextServerExtension::font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) {
- GDVIRTUAL_CALL(font_render_glyph, p_font_rid, p_size, p_index);
+ GDVIRTUAL_CALL(_font_render_glyph, p_font_rid, p_size, p_index);
}
void TextServerExtension::font_draw_glyph(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
- GDVIRTUAL_CALL(font_draw_glyph, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color);
+ GDVIRTUAL_CALL(_font_draw_glyph, p_font_rid, p_canvas, p_size, p_pos, p_index, p_color);
}
void TextServerExtension::font_draw_glyph_outline(const RID &p_font_rid, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
- GDVIRTUAL_CALL(font_draw_glyph_outline, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);
+ GDVIRTUAL_CALL(_font_draw_glyph_outline, p_font_rid, p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);
}
bool TextServerExtension::font_is_language_supported(const RID &p_font_rid, const String &p_language) const {
bool ret;
- if (GDVIRTUAL_CALL(font_is_language_supported, p_font_rid, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_font_is_language_supported, p_font_rid, p_language, ret)) {
return ret;
}
return false;
}
void TextServerExtension::font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) {
- GDVIRTUAL_CALL(font_set_language_support_override, p_font_rid, p_language, p_supported);
+ GDVIRTUAL_CALL(_font_set_language_support_override, p_font_rid, p_language, p_supported);
}
bool TextServerExtension::font_get_language_support_override(const RID &p_font_rid, const String &p_language) {
bool ret;
- if (GDVIRTUAL_CALL(font_get_language_support_override, p_font_rid, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_language_support_override, p_font_rid, p_language, ret)) {
return ret;
}
return false;
}
void TextServerExtension::font_remove_language_support_override(const RID &p_font_rid, const String &p_language) {
- GDVIRTUAL_CALL(font_remove_language_support_override, p_font_rid, p_language);
+ GDVIRTUAL_CALL(_font_remove_language_support_override, p_font_rid, p_language);
}
PackedStringArray TextServerExtension::font_get_language_support_overrides(const RID &p_font_rid) {
PackedStringArray ret;
- if (GDVIRTUAL_CALL(font_get_language_support_overrides, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_language_support_overrides, p_font_rid, ret)) {
return ret;
}
return PackedStringArray();
@@ -952,43 +952,43 @@ PackedStringArray TextServerExtension::font_get_language_support_overrides(const
bool TextServerExtension::font_is_script_supported(const RID &p_font_rid, const String &p_script) const {
bool ret;
- if (GDVIRTUAL_CALL(font_is_script_supported, p_font_rid, p_script, ret)) {
+ if (GDVIRTUAL_CALL(_font_is_script_supported, p_font_rid, p_script, ret)) {
return ret;
}
return false;
}
void TextServerExtension::font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) {
- GDVIRTUAL_CALL(font_set_script_support_override, p_font_rid, p_script, p_supported);
+ GDVIRTUAL_CALL(_font_set_script_support_override, p_font_rid, p_script, p_supported);
}
bool TextServerExtension::font_get_script_support_override(const RID &p_font_rid, const String &p_script) {
bool ret;
- if (GDVIRTUAL_CALL(font_get_script_support_override, p_font_rid, p_script, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_script_support_override, p_font_rid, p_script, ret)) {
return ret;
}
return false;
}
void TextServerExtension::font_remove_script_support_override(const RID &p_font_rid, const String &p_script) {
- GDVIRTUAL_CALL(font_remove_script_support_override, p_font_rid, p_script);
+ GDVIRTUAL_CALL(_font_remove_script_support_override, p_font_rid, p_script);
}
PackedStringArray TextServerExtension::font_get_script_support_overrides(const RID &p_font_rid) {
PackedStringArray ret;
- if (GDVIRTUAL_CALL(font_get_script_support_overrides, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_script_support_overrides, p_font_rid, ret)) {
return ret;
}
return PackedStringArray();
}
void TextServerExtension::font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) {
- GDVIRTUAL_CALL(font_set_opentype_feature_overrides, p_font_rid, p_overrides);
+ GDVIRTUAL_CALL(_font_set_opentype_feature_overrides, p_font_rid, p_overrides);
}
Dictionary TextServerExtension::font_get_opentype_feature_overrides(const RID &p_font_rid) const {
Dictionary ret;
- if (GDVIRTUAL_CALL(font_get_opentype_feature_overrides, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_opentype_feature_overrides, p_font_rid, ret)) {
return ret;
}
return Dictionary();
@@ -996,7 +996,7 @@ Dictionary TextServerExtension::font_get_opentype_feature_overrides(const RID &p
Dictionary TextServerExtension::font_supported_feature_list(const RID &p_font_rid) const {
Dictionary ret;
- if (GDVIRTUAL_CALL(font_supported_feature_list, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_supported_feature_list, p_font_rid, ret)) {
return ret;
}
return Dictionary();
@@ -1004,7 +1004,7 @@ Dictionary TextServerExtension::font_supported_feature_list(const RID &p_font_ri
Dictionary TextServerExtension::font_supported_variation_list(const RID &p_font_rid) const {
Dictionary ret;
- if (GDVIRTUAL_CALL(font_supported_variation_list, p_font_rid, ret)) {
+ if (GDVIRTUAL_CALL(_font_supported_variation_list, p_font_rid, ret)) {
return ret;
}
return Dictionary();
@@ -1012,26 +1012,26 @@ Dictionary TextServerExtension::font_supported_variation_list(const RID &p_font_
double TextServerExtension::font_get_global_oversampling() const {
double ret;
- if (GDVIRTUAL_CALL(font_get_global_oversampling, ret)) {
+ if (GDVIRTUAL_CALL(_font_get_global_oversampling, ret)) {
return ret;
}
return 0.0;
}
void TextServerExtension::font_set_global_oversampling(double p_oversampling) {
- GDVIRTUAL_CALL(font_set_global_oversampling, p_oversampling);
+ GDVIRTUAL_CALL(_font_set_global_oversampling, p_oversampling);
}
Vector2 TextServerExtension::get_hex_code_box_size(int64_t p_size, int64_t p_index) const {
Vector2 ret;
- if (GDVIRTUAL_CALL(get_hex_code_box_size, p_size, p_index, ret)) {
+ if (GDVIRTUAL_CALL(_get_hex_code_box_size, p_size, p_index, ret)) {
return ret;
}
return TextServer::get_hex_code_box_size(p_size, p_index);
}
void TextServerExtension::draw_hex_code_box(const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const {
- if (!GDVIRTUAL_CALL(draw_hex_code_box, p_canvas, p_size, p_pos, p_index, p_color)) {
+ if (!GDVIRTUAL_CALL(_draw_hex_code_box, p_canvas, p_size, p_pos, p_index, p_color)) {
TextServer::draw_hex_code_box(p_canvas, p_size, p_pos, p_index, p_color);
}
}
@@ -1042,23 +1042,23 @@ void TextServerExtension::draw_hex_code_box(const RID &p_canvas, int64_t p_size,
RID TextServerExtension::create_shaped_text(TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
RID ret;
- if (GDVIRTUAL_CALL(create_shaped_text, p_direction, p_orientation, ret)) {
+ if (GDVIRTUAL_CALL(_create_shaped_text, p_direction, p_orientation, ret)) {
return ret;
}
return RID();
}
void TextServerExtension::shaped_text_clear(const RID &p_shaped) {
- GDVIRTUAL_CALL(shaped_text_clear, p_shaped);
+ GDVIRTUAL_CALL(_shaped_text_clear, p_shaped);
}
void TextServerExtension::shaped_text_set_direction(const RID &p_shaped, TextServer::Direction p_direction) {
- GDVIRTUAL_CALL(shaped_text_set_direction, p_shaped, p_direction);
+ GDVIRTUAL_CALL(_shaped_text_set_direction, p_shaped, p_direction);
}
TextServer::Direction TextServerExtension::shaped_text_get_direction(const RID &p_shaped) const {
TextServer::Direction ret;
- if (GDVIRTUAL_CALL(shaped_text_get_direction, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_direction, p_shaped, ret)) {
return (TextServer::Direction)ret;
}
return TextServer::Direction::DIRECTION_AUTO;
@@ -1066,71 +1066,71 @@ TextServer::Direction TextServerExtension::shaped_text_get_direction(const RID &
TextServer::Direction TextServerExtension::shaped_text_get_inferred_direction(const RID &p_shaped) const {
TextServer::Direction ret;
- if (GDVIRTUAL_CALL(shaped_text_get_inferred_direction, p_shaped, 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(const RID &p_shaped, TextServer::Orientation p_orientation) {
- GDVIRTUAL_CALL(shaped_text_set_orientation, p_shaped, p_orientation);
+ GDVIRTUAL_CALL(_shaped_text_set_orientation, p_shaped, p_orientation);
}
TextServer::Orientation TextServerExtension::shaped_text_get_orientation(const RID &p_shaped) const {
TextServer::Orientation ret;
- if (GDVIRTUAL_CALL(shaped_text_get_orientation, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_orientation, p_shaped, ret)) {
return (TextServer::Orientation)ret;
}
return TextServer::Orientation::ORIENTATION_HORIZONTAL;
}
void TextServerExtension::shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) {
- GDVIRTUAL_CALL(shaped_text_set_bidi_override, p_shaped, p_override);
+ GDVIRTUAL_CALL(_shaped_text_set_bidi_override, p_shaped, p_override);
}
void TextServerExtension::shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) {
- GDVIRTUAL_CALL(shaped_text_set_custom_punctuation, p_shaped, p_punct);
+ GDVIRTUAL_CALL(_shaped_text_set_custom_punctuation, p_shaped, p_punct);
}
String TextServerExtension::shaped_text_get_custom_punctuation(const RID &p_shaped) const {
String ret;
- if (GDVIRTUAL_CALL(shaped_text_get_custom_punctuation, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_custom_punctuation, p_shaped, ret)) {
return ret;
}
return String();
}
void TextServerExtension::shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) {
- GDVIRTUAL_CALL(shaped_text_set_preserve_invalid, p_shaped, p_enabled);
+ GDVIRTUAL_CALL(_shaped_text_set_preserve_invalid, p_shaped, p_enabled);
}
bool TextServerExtension::shaped_text_get_preserve_invalid(const RID &p_shaped) const {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_get_preserve_invalid, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_preserve_invalid, p_shaped, ret)) {
return ret;
}
return false;
}
void TextServerExtension::shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) {
- GDVIRTUAL_CALL(shaped_text_set_preserve_control, p_shaped, p_enabled);
+ GDVIRTUAL_CALL(_shaped_text_set_preserve_control, p_shaped, p_enabled);
}
bool TextServerExtension::shaped_text_get_preserve_control(const RID &p_shaped) const {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_get_preserve_control, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_preserve_control, p_shaped, ret)) {
return ret;
}
return false;
}
void TextServerExtension::shaped_text_set_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing, int64_t p_value) {
- GDVIRTUAL_CALL(shaped_text_set_spacing, p_shaped, p_spacing, p_value);
+ GDVIRTUAL_CALL(_shaped_text_set_spacing, p_shaped, p_spacing, p_value);
}
int64_t TextServerExtension::shaped_text_get_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_get_spacing, p_shaped, p_spacing, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_spacing, p_shaped, p_spacing, ret)) {
return ret;
}
return 0;
@@ -1138,7 +1138,7 @@ int64_t TextServerExtension::shaped_text_get_spacing(const RID &p_shaped, TextSe
bool TextServerExtension::shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret)) {
return ret;
}
return false;
@@ -1146,7 +1146,7 @@ bool TextServerExtension::shaped_text_add_string(const RID &p_shaped, const Stri
bool TextServerExtension::shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align, int64_t p_length) {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_add_object, p_shaped, p_key, p_size, p_inline_align, p_length, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_add_object, p_shaped, p_key, p_size, p_inline_align, p_length, ret)) {
return ret;
}
return false;
@@ -1154,7 +1154,7 @@ bool TextServerExtension::shaped_text_add_object(const RID &p_shaped, const Vari
bool TextServerExtension::shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align) {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_resize_object, p_shaped, p_key, p_size, p_inline_align, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_resize_object, p_shaped, p_key, p_size, p_inline_align, ret)) {
return ret;
}
return false;
@@ -1162,7 +1162,7 @@ bool TextServerExtension::shaped_text_resize_object(const RID &p_shaped, const V
int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_get_span_count, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_get_span_count, p_shaped, ret)) {
return ret;
}
return 0;
@@ -1170,19 +1170,19 @@ int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {
Variant TextServerExtension::shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const {
Variant ret;
- if (GDVIRTUAL_CALL(shaped_get_span_meta, p_shaped, p_index, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_get_span_meta, p_shaped, p_index, ret)) {
return ret;
}
return false;
}
void TextServerExtension::shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
- GDVIRTUAL_CALL(shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);
+ GDVIRTUAL_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);
}
RID TextServerExtension::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
RID ret;
- if (GDVIRTUAL_CALL(shaped_text_substr, p_shaped, p_start, p_length, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_substr, p_shaped, p_start, p_length, ret)) {
return ret;
}
return RID();
@@ -1190,7 +1190,7 @@ RID TextServerExtension::shaped_text_substr(const RID &p_shaped, int64_t p_start
RID TextServerExtension::shaped_text_get_parent(const RID &p_shaped) const {
RID ret;
- if (GDVIRTUAL_CALL(shaped_text_get_parent, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_parent, p_shaped, ret)) {
return ret;
}
return RID();
@@ -1198,7 +1198,7 @@ RID TextServerExtension::shaped_text_get_parent(const RID &p_shaped) const {
double TextServerExtension::shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags) {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_fit_to_width, p_shaped, p_width, p_jst_flags, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_fit_to_width, p_shaped, p_width, p_jst_flags, ret)) {
return ret;
}
return 0.0;
@@ -1206,7 +1206,7 @@ double TextServerExtension::shaped_text_fit_to_width(const RID &p_shaped, double
double TextServerExtension::shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_tab_align, p_shaped, p_tab_stops, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_tab_align, p_shaped, p_tab_stops, ret)) {
return ret;
}
return 0.0;
@@ -1214,7 +1214,7 @@ double TextServerExtension::shaped_text_tab_align(const RID &p_shaped, const Pac
bool TextServerExtension::shaped_text_shape(const RID &p_shaped) {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_shape, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_shape, p_shaped, ret)) {
return ret;
}
return false;
@@ -1222,7 +1222,7 @@ bool TextServerExtension::shaped_text_shape(const RID &p_shaped) {
bool TextServerExtension::shaped_text_update_breaks(const RID &p_shaped) {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_update_breaks, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_update_breaks, p_shaped, ret)) {
return ret;
}
return false;
@@ -1230,7 +1230,7 @@ bool TextServerExtension::shaped_text_update_breaks(const RID &p_shaped) {
bool TextServerExtension::shaped_text_update_justification_ops(const RID &p_shaped) {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_update_justification_ops, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_update_justification_ops, p_shaped, ret)) {
return ret;
}
return false;
@@ -1238,7 +1238,7 @@ bool TextServerExtension::shaped_text_update_justification_ops(const RID &p_shap
bool TextServerExtension::shaped_text_is_ready(const RID &p_shaped) const {
bool ret;
- if (GDVIRTUAL_CALL(shaped_text_is_ready, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_is_ready, p_shaped, ret)) {
return ret;
}
return false;
@@ -1246,7 +1246,7 @@ bool TextServerExtension::shaped_text_is_ready(const RID &p_shaped) const {
const Glyph *TextServerExtension::shaped_text_get_glyphs(const RID &p_shaped) const {
GDNativeConstPtr<const Glyph> ret;
- if (GDVIRTUAL_CALL(shaped_text_get_glyphs, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_glyphs, p_shaped, ret)) {
return ret;
}
return nullptr;
@@ -1254,7 +1254,7 @@ const Glyph *TextServerExtension::shaped_text_get_glyphs(const RID &p_shaped) co
const Glyph *TextServerExtension::shaped_text_sort_logical(const RID &p_shaped) {
GDNativeConstPtr<const Glyph> ret;
- if (GDVIRTUAL_CALL(shaped_text_sort_logical, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_sort_logical, p_shaped, ret)) {
return ret;
}
return nullptr;
@@ -1262,7 +1262,7 @@ const Glyph *TextServerExtension::shaped_text_sort_logical(const RID &p_shaped)
int64_t TextServerExtension::shaped_text_get_glyph_count(const RID &p_shaped) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_get_glyph_count, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_glyph_count, p_shaped, ret)) {
return ret;
}
return 0;
@@ -1270,7 +1270,7 @@ int64_t TextServerExtension::shaped_text_get_glyph_count(const RID &p_shaped) co
Vector2i TextServerExtension::shaped_text_get_range(const RID &p_shaped) const {
Vector2i ret;
- if (GDVIRTUAL_CALL(shaped_text_get_range, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_range, p_shaped, ret)) {
return ret;
}
return Vector2i();
@@ -1278,7 +1278,7 @@ Vector2i TextServerExtension::shaped_text_get_range(const RID &p_shaped) const {
PackedInt32Array TextServerExtension::shaped_text_get_line_breaks_adv(const RID &p_shaped, const PackedFloat32Array &p_width, int64_t p_start, bool p_once, BitField<TextServer::LineBreakFlag> p_break_flags) const {
PackedInt32Array ret;
- if (GDVIRTUAL_CALL(shaped_text_get_line_breaks_adv, p_shaped, p_width, p_start, p_once, p_break_flags, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks_adv, p_shaped, p_width, p_start, p_once, p_break_flags, ret)) {
return ret;
}
return TextServer::shaped_text_get_line_breaks_adv(p_shaped, p_width, p_start, p_once, p_break_flags);
@@ -1286,7 +1286,7 @@ PackedInt32Array TextServerExtension::shaped_text_get_line_breaks_adv(const RID
PackedInt32Array TextServerExtension::shaped_text_get_line_breaks(const RID &p_shaped, double p_width, int64_t p_start, BitField<TextServer::LineBreakFlag> p_break_flags) const {
PackedInt32Array ret;
- if (GDVIRTUAL_CALL(shaped_text_get_line_breaks, p_shaped, p_width, p_start, p_break_flags, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_line_breaks, p_shaped, p_width, p_start, p_break_flags, ret)) {
return ret;
}
return TextServer::shaped_text_get_line_breaks(p_shaped, p_width, p_start, p_break_flags);
@@ -1294,7 +1294,7 @@ PackedInt32Array TextServerExtension::shaped_text_get_line_breaks(const RID &p_s
PackedInt32Array TextServerExtension::shaped_text_get_word_breaks(const RID &p_shaped, BitField<TextServer::GraphemeFlag> p_grapheme_flags) const {
PackedInt32Array ret;
- if (GDVIRTUAL_CALL(shaped_text_get_word_breaks, p_shaped, p_grapheme_flags, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_word_breaks, p_shaped, p_grapheme_flags, ret)) {
return ret;
}
return TextServer::shaped_text_get_word_breaks(p_shaped, p_grapheme_flags);
@@ -1302,7 +1302,7 @@ PackedInt32Array TextServerExtension::shaped_text_get_word_breaks(const RID &p_s
int64_t TextServerExtension::shaped_text_get_trim_pos(const RID &p_shaped) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_get_trim_pos, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_trim_pos, p_shaped, ret)) {
return ret;
}
return -1;
@@ -1310,7 +1310,7 @@ int64_t TextServerExtension::shaped_text_get_trim_pos(const RID &p_shaped) const
int64_t TextServerExtension::shaped_text_get_ellipsis_pos(const RID &p_shaped) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_get_ellipsis_pos, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_ellipsis_pos, p_shaped, ret)) {
return ret;
}
return -1;
@@ -1318,7 +1318,7 @@ int64_t TextServerExtension::shaped_text_get_ellipsis_pos(const RID &p_shaped) c
const Glyph *TextServerExtension::shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const {
GDNativeConstPtr<const Glyph> ret;
- if (GDVIRTUAL_CALL(shaped_text_get_ellipsis_glyphs, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyphs, p_shaped, ret)) {
return ret;
}
return nullptr;
@@ -1326,19 +1326,19 @@ const Glyph *TextServerExtension::shaped_text_get_ellipsis_glyphs(const RID &p_s
int64_t TextServerExtension::shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_get_ellipsis_glyph_count, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_ellipsis_glyph_count, p_shaped, ret)) {
return ret;
}
return -1;
}
void TextServerExtension::shaped_text_overrun_trim_to_width(const RID &p_shaped_line, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) {
- GDVIRTUAL_CALL(shaped_text_overrun_trim_to_width, p_shaped_line, p_width, p_trim_flags);
+ GDVIRTUAL_CALL(_shaped_text_overrun_trim_to_width, p_shaped_line, p_width, p_trim_flags);
}
Array TextServerExtension::shaped_text_get_objects(const RID &p_shaped) const {
Array ret;
- if (GDVIRTUAL_CALL(shaped_text_get_objects, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_objects, p_shaped, ret)) {
return ret;
}
return Array();
@@ -1346,7 +1346,7 @@ Array TextServerExtension::shaped_text_get_objects(const RID &p_shaped) const {
Rect2 TextServerExtension::shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const {
Rect2 ret;
- if (GDVIRTUAL_CALL(shaped_text_get_object_rect, p_shaped, p_key, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_object_rect, p_shaped, p_key, ret)) {
return ret;
}
return Rect2();
@@ -1354,7 +1354,7 @@ Rect2 TextServerExtension::shaped_text_get_object_rect(const RID &p_shaped, cons
Size2 TextServerExtension::shaped_text_get_size(const RID &p_shaped) const {
Size2 ret;
- if (GDVIRTUAL_CALL(shaped_text_get_size, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_size, p_shaped, ret)) {
return ret;
}
return Size2();
@@ -1362,7 +1362,7 @@ Size2 TextServerExtension::shaped_text_get_size(const RID &p_shaped) const {
double TextServerExtension::shaped_text_get_ascent(const RID &p_shaped) const {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_get_ascent, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_ascent, p_shaped, ret)) {
return ret;
}
return 0.0;
@@ -1370,7 +1370,7 @@ double TextServerExtension::shaped_text_get_ascent(const RID &p_shaped) const {
double TextServerExtension::shaped_text_get_descent(const RID &p_shaped) const {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_get_descent, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_descent, p_shaped, ret)) {
return ret;
}
return 0.0;
@@ -1378,7 +1378,7 @@ double TextServerExtension::shaped_text_get_descent(const RID &p_shaped) const {
double TextServerExtension::shaped_text_get_width(const RID &p_shaped) const {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_get_width, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_width, p_shaped, ret)) {
return ret;
}
return 0.0;
@@ -1386,7 +1386,7 @@ double TextServerExtension::shaped_text_get_width(const RID &p_shaped) const {
double TextServerExtension::shaped_text_get_underline_position(const RID &p_shaped) const {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_get_underline_position, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_underline_position, p_shaped, ret)) {
return ret;
}
return 0.0;
@@ -1394,7 +1394,7 @@ double TextServerExtension::shaped_text_get_underline_position(const RID &p_shap
double TextServerExtension::shaped_text_get_underline_thickness(const RID &p_shaped) const {
double ret;
- if (GDVIRTUAL_CALL(shaped_text_get_underline_thickness, p_shaped, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_underline_thickness, p_shaped, ret)) {
return ret;
}
return 0.0;
@@ -1402,7 +1402,7 @@ double TextServerExtension::shaped_text_get_underline_thickness(const RID &p_sha
TextServer::Direction TextServerExtension::shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_get_dominant_direction_in_range, p_shaped, p_start, p_end, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_dominant_direction_in_range, p_shaped, p_start, p_end, ret)) {
return (TextServer::Direction)ret;
}
return TextServer::shaped_text_get_dominant_direction_in_range(p_shaped, p_start, p_end);
@@ -1410,7 +1410,7 @@ TextServer::Direction TextServerExtension::shaped_text_get_dominant_direction_in
CaretInfo TextServerExtension::shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const {
CaretInfo ret;
- if (GDVIRTUAL_CALL(shaped_text_get_carets, p_shaped, p_position, &ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_carets, p_shaped, p_position, &ret)) {
return ret;
}
return TextServer::shaped_text_get_carets(p_shaped, p_position);
@@ -1418,7 +1418,7 @@ CaretInfo TextServerExtension::shaped_text_get_carets(const RID &p_shaped, int64
Vector<Vector2> TextServerExtension::shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const {
Vector<Vector2> ret;
- if (GDVIRTUAL_CALL(shaped_text_get_selection, p_shaped, p_start, p_end, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_get_selection, p_shaped, p_start, p_end, ret)) {
return ret;
}
return TextServer::shaped_text_get_selection(p_shaped, p_start, p_end);
@@ -1426,7 +1426,7 @@ Vector<Vector2> TextServerExtension::shaped_text_get_selection(const RID &p_shap
int64_t TextServerExtension::shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_hit_test_grapheme, p_shaped, p_coords, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_hit_test_grapheme, p_shaped, p_coords, ret)) {
return ret;
}
return TextServer::shaped_text_hit_test_grapheme(p_shaped, p_coords);
@@ -1434,21 +1434,21 @@ int64_t TextServerExtension::shaped_text_hit_test_grapheme(const RID &p_shaped,
int64_t TextServerExtension::shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_hit_test_position, p_shaped, p_coords, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_hit_test_position, p_shaped, p_coords, ret)) {
return ret;
}
return TextServer::shaped_text_hit_test_position(p_shaped, p_coords);
}
void TextServerExtension::shaped_text_draw(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l, double p_clip_r, const Color &p_color) const {
- if (GDVIRTUAL_CALL(shaped_text_draw, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color)) {
+ if (GDVIRTUAL_CALL(_shaped_text_draw, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color)) {
return;
}
TextServer::shaped_text_draw(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_color);
}
void TextServerExtension::shaped_text_draw_outline(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l, double p_clip_r, int64_t p_outline_size, const Color &p_color) const {
- if (GDVIRTUAL_CALL(shaped_text_draw_outline, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color)) {
+ if (GDVIRTUAL_CALL(_shaped_text_draw_outline, p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color)) {
return;
}
TextServer::shaped_text_draw_outline(p_shaped, p_canvas, p_pos, p_clip_l, p_clip_r, p_outline_size, p_color);
@@ -1456,7 +1456,7 @@ void TextServerExtension::shaped_text_draw_outline(const RID &p_shaped, const RI
Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const {
Vector2 ret;
- if (GDVIRTUAL_CALL(shaped_text_get_grapheme_bounds, p_shaped, p_pos, 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);
@@ -1464,7 +1464,7 @@ Vector2 TextServerExtension::shaped_text_get_grapheme_bounds(const RID &p_shaped
int64_t TextServerExtension::shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_next_grapheme_pos, p_shaped, p_pos, ret)) {
return ret;
}
return TextServer::shaped_text_next_grapheme_pos(p_shaped, p_pos);
@@ -1472,7 +1472,7 @@ int64_t TextServerExtension::shaped_text_next_grapheme_pos(const RID &p_shaped,
int64_t TextServerExtension::shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const {
int64_t ret;
- if (GDVIRTUAL_CALL(shaped_text_prev_grapheme_pos, p_shaped, p_pos, ret)) {
+ if (GDVIRTUAL_CALL(_shaped_text_prev_grapheme_pos, p_shaped, p_pos, ret)) {
return ret;
}
return TextServer::shaped_text_prev_grapheme_pos(p_shaped, p_pos);
@@ -1480,7 +1480,7 @@ int64_t TextServerExtension::shaped_text_prev_grapheme_pos(const RID &p_shaped,
String TextServerExtension::format_number(const String &p_string, const String &p_language) const {
String ret;
- if (GDVIRTUAL_CALL(format_number, p_string, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_format_number, p_string, p_language, ret)) {
return ret;
}
return p_string;
@@ -1488,7 +1488,7 @@ String TextServerExtension::format_number(const String &p_string, const String &
String TextServerExtension::parse_number(const String &p_string, const String &p_language) const {
String ret;
- if (GDVIRTUAL_CALL(parse_number, p_string, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_parse_number, p_string, p_language, ret)) {
return ret;
}
return p_string;
@@ -1496,7 +1496,7 @@ String TextServerExtension::parse_number(const String &p_string, const String &p
String TextServerExtension::percent_sign(const String &p_language) const {
String ret;
- if (GDVIRTUAL_CALL(percent_sign, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_percent_sign, p_language, ret)) {
return ret;
}
return "%";
@@ -1504,7 +1504,7 @@ String TextServerExtension::percent_sign(const String &p_language) const {
bool TextServerExtension::is_valid_identifier(const String &p_string) const {
bool ret;
- if (GDVIRTUAL_CALL(is_valid_identifier, p_string, ret)) {
+ if (GDVIRTUAL_CALL(_is_valid_identifier, p_string, ret)) {
return ret;
}
return TextServer::is_valid_identifier(p_string);
@@ -1512,7 +1512,7 @@ bool TextServerExtension::is_valid_identifier(const String &p_string) const {
String TextServerExtension::strip_diacritics(const String &p_string) const {
String ret;
- if (GDVIRTUAL_CALL(strip_diacritics, p_string, ret)) {
+ if (GDVIRTUAL_CALL(_strip_diacritics, p_string, ret)) {
return ret;
}
return TextServer::strip_diacritics(p_string);
@@ -1520,7 +1520,7 @@ String TextServerExtension::strip_diacritics(const String &p_string) const {
String TextServerExtension::string_to_upper(const String &p_string, const String &p_language) const {
String ret;
- if (GDVIRTUAL_CALL(string_to_upper, p_string, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_string_to_upper, p_string, p_language, ret)) {
return ret;
}
return p_string;
@@ -1528,7 +1528,7 @@ String TextServerExtension::string_to_upper(const String &p_string, const String
String TextServerExtension::string_to_lower(const String &p_string, const String &p_language) const {
String ret;
- if (GDVIRTUAL_CALL(string_to_lower, p_string, p_language, ret)) {
+ if (GDVIRTUAL_CALL(_string_to_lower, p_string, p_language, ret)) {
return ret;
}
return p_string;
@@ -1536,7 +1536,7 @@ String TextServerExtension::string_to_lower(const String &p_string, const String
TypedArray<Vector2i> TextServerExtension::parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const {
TypedArray<Vector2i> ret;
- if (GDVIRTUAL_CALL(parse_structured_text, p_parser_type, p_args, p_text, ret)) {
+ if (GDVIRTUAL_CALL(_parse_structured_text, p_parser_type, p_args, p_text, ret)) {
return ret;
}
return TypedArray<Vector2i>();
@@ -1544,7 +1544,7 @@ TypedArray<Vector2i> TextServerExtension::parse_structured_text(StructuredTextPa
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)) {
+ if (GDVIRTUAL_CALL(_string_get_word_breaks, p_string, p_language, ret)) {
return ret;
}
return PackedInt32Array();
@@ -1552,7 +1552,7 @@ PackedInt32Array TextServerExtension::string_get_word_breaks(const String &p_str
int64_t TextServerExtension::is_confusable(const String &p_string, const PackedStringArray &p_dict) const {
int64_t ret;
- if (GDVIRTUAL_CALL(is_confusable, p_string, p_dict, ret)) {
+ if (GDVIRTUAL_CALL(_is_confusable, p_string, p_dict, ret)) {
return ret;
}
return TextServer::is_confusable(p_string, p_dict);
@@ -1560,7 +1560,7 @@ int64_t TextServerExtension::is_confusable(const String &p_string, const PackedS
bool TextServerExtension::spoof_check(const String &p_string) const {
bool ret;
- if (GDVIRTUAL_CALL(spoof_check, p_string, ret)) {
+ if (GDVIRTUAL_CALL(_spoof_check, p_string, ret)) {
return ret;
}
return TextServer::spoof_check(p_string);
diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h
index fbaa4961e1..992b708045 100644
--- a/servers/text/text_server_extension.h
+++ b/servers/text/text_server_extension.h
@@ -50,401 +50,402 @@ public:
virtual bool has_feature(Feature p_feature) const override;
virtual String get_name() const override;
virtual int64_t get_features() const override;
- GDVIRTUAL1RC(bool, has_feature, Feature);
- GDVIRTUAL0RC(String, get_name);
- GDVIRTUAL0RC(int64_t, get_features);
+ GDVIRTUAL1RC(bool, _has_feature, Feature);
+ GDVIRTUAL0RC(String, _get_name);
+ GDVIRTUAL0RC(int64_t, _get_features);
virtual void free_rid(const RID &p_rid) override;
virtual bool has(const RID &p_rid) override;
virtual bool load_support_data(const String &p_filename) override;
- GDVIRTUAL1(free_rid, RID);
- GDVIRTUAL1R(bool, has, RID);
- GDVIRTUAL1R(bool, load_support_data, const String &);
+ GDVIRTUAL1(_free_rid, RID);
+ GDVIRTUAL1R(bool, _has, RID);
+ GDVIRTUAL1R(bool, _load_support_data, const String &);
virtual String get_support_data_filename() const override;
virtual String get_support_data_info() const override;
virtual bool save_support_data(const String &p_filename) const override;
- GDVIRTUAL0RC(String, get_support_data_filename);
- GDVIRTUAL0RC(String, get_support_data_info);
- GDVIRTUAL1RC(bool, save_support_data, const String &);
+ GDVIRTUAL0RC(String, _get_support_data_filename);
+ GDVIRTUAL0RC(String, _get_support_data_info);
+ GDVIRTUAL1RC(bool, _save_support_data, const String &);
virtual bool is_locale_right_to_left(const String &p_locale) const override;
- GDVIRTUAL1RC(bool, is_locale_right_to_left, const String &);
+ GDVIRTUAL1RC(bool, _is_locale_right_to_left, const String &);
virtual int64_t name_to_tag(const String &p_name) const override;
virtual String tag_to_name(int64_t p_tag) const override;
- GDVIRTUAL1RC(int64_t, name_to_tag, const String &);
- GDVIRTUAL1RC(String, tag_to_name, int64_t);
+ GDVIRTUAL1RC(int64_t, _name_to_tag, const String &);
+ GDVIRTUAL1RC(String, _tag_to_name, int64_t);
/* Font interface */
+
virtual RID create_font() override;
- GDVIRTUAL0R(RID, create_font);
+ GDVIRTUAL0R(RID, _create_font);
virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) override;
virtual void font_set_data_ptr(const RID &p_font_rid, const uint8_t *p_data_ptr, int64_t p_data_size) override;
- GDVIRTUAL2(font_set_data, RID, const PackedByteArray &);
- GDVIRTUAL3(font_set_data_ptr, RID, GDNativeConstPtr<const uint8_t>, int64_t);
+ GDVIRTUAL2(_font_set_data, RID, const PackedByteArray &);
+ GDVIRTUAL3(_font_set_data_ptr, RID, GDNativeConstPtr<const uint8_t>, int64_t);
virtual void font_set_face_index(const RID &p_font_rid, int64_t p_index) override;
virtual int64_t font_get_face_index(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_face_index, RID, int64_t);
- GDVIRTUAL1RC(int64_t, font_get_face_index, RID);
+ GDVIRTUAL2(_font_set_face_index, RID, int64_t);
+ GDVIRTUAL1RC(int64_t, _font_get_face_index, RID);
virtual int64_t font_get_face_count(const RID &p_font_rid) const override;
- GDVIRTUAL1RC(int64_t, font_get_face_count, RID);
+ GDVIRTUAL1RC(int64_t, _font_get_face_count, RID);
virtual void font_set_style(const RID &p_font_rid, BitField<FontStyle> p_style) override;
virtual BitField<FontStyle> font_get_style(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_style, RID, BitField<FontStyle>);
- GDVIRTUAL1RC(BitField<FontStyle>, font_get_style, RID);
+ GDVIRTUAL2(_font_set_style, RID, BitField<FontStyle>);
+ GDVIRTUAL1RC(BitField<FontStyle>, _font_get_style, RID);
virtual void font_set_name(const RID &p_font_rid, const String &p_name) override;
virtual String font_get_name(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_name, RID, const String &);
- GDVIRTUAL1RC(String, font_get_name, RID);
+ GDVIRTUAL2(_font_set_name, RID, const String &);
+ GDVIRTUAL1RC(String, _font_get_name, RID);
virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) override;
virtual String font_get_style_name(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_style_name, RID, const String &);
- GDVIRTUAL1RC(String, font_get_style_name, RID);
+ GDVIRTUAL2(_font_set_style_name, RID, const String &);
+ GDVIRTUAL1RC(String, _font_get_style_name, RID);
- virtual void font_set_antialiasing(RID p_font_rid, TextServer::FontAntialiasing p_antialiasing) override;
- virtual TextServer::FontAntialiasing font_get_antialiasing(RID p_font_rid) const override;
- GDVIRTUAL2(font_set_antialiasing, RID, TextServer::FontAntialiasing);
- GDVIRTUAL1RC(TextServer::FontAntialiasing, font_get_antialiasing, RID);
+ virtual void font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) override;
+ virtual TextServer::FontAntialiasing font_get_antialiasing(const RID &p_font_rid) const override;
+ GDVIRTUAL2(_font_set_antialiasing, RID, TextServer::FontAntialiasing);
+ GDVIRTUAL1RC(TextServer::FontAntialiasing, _font_get_antialiasing, RID);
virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) override;
virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_generate_mipmaps, RID, bool);
- GDVIRTUAL1RC(bool, font_get_generate_mipmaps, RID);
+ GDVIRTUAL2(_font_set_generate_mipmaps, RID, bool);
+ GDVIRTUAL1RC(bool, _font_get_generate_mipmaps, RID);
virtual void font_set_multichannel_signed_distance_field(const RID &p_font_rid, bool p_msdf) override;
virtual bool font_is_multichannel_signed_distance_field(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_multichannel_signed_distance_field, RID, bool);
- GDVIRTUAL1RC(bool, font_is_multichannel_signed_distance_field, RID);
+ GDVIRTUAL2(_font_set_multichannel_signed_distance_field, RID, bool);
+ GDVIRTUAL1RC(bool, _font_is_multichannel_signed_distance_field, RID);
virtual void font_set_msdf_pixel_range(const RID &p_font_rid, int64_t p_msdf_pixel_range) override;
virtual int64_t font_get_msdf_pixel_range(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_msdf_pixel_range, RID, int64_t);
- GDVIRTUAL1RC(int64_t, font_get_msdf_pixel_range, RID);
+ GDVIRTUAL2(_font_set_msdf_pixel_range, RID, int64_t);
+ GDVIRTUAL1RC(int64_t, _font_get_msdf_pixel_range, RID);
virtual void font_set_msdf_size(const RID &p_font_rid, int64_t p_msdf_size) override;
virtual int64_t font_get_msdf_size(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_msdf_size, RID, int64_t);
- GDVIRTUAL1RC(int64_t, font_get_msdf_size, RID);
+ GDVIRTUAL2(_font_set_msdf_size, RID, int64_t);
+ GDVIRTUAL1RC(int64_t, _font_get_msdf_size, RID);
virtual void font_set_fixed_size(const RID &p_font_rid, int64_t p_fixed_size) override;
virtual int64_t font_get_fixed_size(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_fixed_size, RID, int64_t);
- GDVIRTUAL1RC(int64_t, font_get_fixed_size, RID);
+ GDVIRTUAL2(_font_set_fixed_size, RID, int64_t);
+ GDVIRTUAL1RC(int64_t, _font_get_fixed_size, RID);
virtual void font_set_subpixel_positioning(const RID &p_font_rid, SubpixelPositioning p_subpixel) override;
virtual SubpixelPositioning font_get_subpixel_positioning(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_subpixel_positioning, RID, SubpixelPositioning);
- GDVIRTUAL1RC(SubpixelPositioning, font_get_subpixel_positioning, RID);
+ GDVIRTUAL2(_font_set_subpixel_positioning, RID, SubpixelPositioning);
+ GDVIRTUAL1RC(SubpixelPositioning, _font_get_subpixel_positioning, RID);
virtual void font_set_embolden(const RID &p_font_rid, double p_strength) override;
virtual double font_get_embolden(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_embolden, RID, double);
- GDVIRTUAL1RC(double, font_get_embolden, RID);
+ GDVIRTUAL2(_font_set_embolden, RID, double);
+ GDVIRTUAL1RC(double, _font_get_embolden, RID);
virtual void font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) override;
virtual Transform2D font_get_transform(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_transform, RID, Transform2D);
- GDVIRTUAL1RC(Transform2D, font_get_transform, RID);
+ GDVIRTUAL2(_font_set_transform, RID, Transform2D);
+ GDVIRTUAL1RC(Transform2D, _font_get_transform, RID);
virtual void font_set_force_autohinter(const RID &p_font_rid, bool p_force_autohinter) override;
virtual bool font_is_force_autohinter(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_force_autohinter, RID, bool);
- GDVIRTUAL1RC(bool, font_is_force_autohinter, RID);
+ GDVIRTUAL2(_font_set_force_autohinter, RID, bool);
+ GDVIRTUAL1RC(bool, _font_is_force_autohinter, RID);
virtual void font_set_hinting(const RID &p_font_rid, Hinting p_hinting) override;
virtual Hinting font_get_hinting(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_hinting, RID, Hinting);
- GDVIRTUAL1RC(Hinting, font_get_hinting, RID);
+ GDVIRTUAL2(_font_set_hinting, RID, Hinting);
+ GDVIRTUAL1RC(Hinting, _font_get_hinting, RID);
virtual void font_set_variation_coordinates(const RID &p_font_rid, const Dictionary &p_variation_coordinates) override;
virtual Dictionary font_get_variation_coordinates(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_variation_coordinates, RID, Dictionary);
- GDVIRTUAL1RC(Dictionary, font_get_variation_coordinates, RID);
+ GDVIRTUAL2(_font_set_variation_coordinates, RID, Dictionary);
+ GDVIRTUAL1RC(Dictionary, _font_get_variation_coordinates, RID);
virtual void font_set_oversampling(const RID &p_font_rid, double p_oversampling) override;
virtual double font_get_oversampling(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_oversampling, RID, double);
- GDVIRTUAL1RC(double, font_get_oversampling, RID);
+ GDVIRTUAL2(_font_set_oversampling, RID, double);
+ GDVIRTUAL1RC(double, _font_get_oversampling, RID);
virtual TypedArray<Vector2i> font_get_size_cache_list(const RID &p_font_rid) const override;
virtual void font_clear_size_cache(const RID &p_font_rid) override;
virtual void font_remove_size_cache(const RID &p_font_rid, const Vector2i &p_size) override;
- GDVIRTUAL1RC(TypedArray<Vector2i>, font_get_size_cache_list, RID);
- GDVIRTUAL1(font_clear_size_cache, RID);
- GDVIRTUAL2(font_remove_size_cache, RID, const Vector2i &);
+ GDVIRTUAL1RC(TypedArray<Vector2i>, _font_get_size_cache_list, RID);
+ GDVIRTUAL1(_font_clear_size_cache, RID);
+ GDVIRTUAL2(_font_remove_size_cache, RID, const Vector2i &);
virtual void font_set_ascent(const RID &p_font_rid, int64_t p_size, double p_ascent) override;
virtual double font_get_ascent(const RID &p_font_rid, int64_t p_size) const override;
- GDVIRTUAL3(font_set_ascent, RID, int64_t, double);
- GDVIRTUAL2RC(double, font_get_ascent, RID, int64_t);
+ GDVIRTUAL3(_font_set_ascent, RID, int64_t, double);
+ GDVIRTUAL2RC(double, _font_get_ascent, RID, int64_t);
virtual void font_set_descent(const RID &p_font_rid, int64_t p_size, double p_descent) override;
virtual double font_get_descent(const RID &p_font_rid, int64_t p_size) const override;
- GDVIRTUAL3(font_set_descent, RID, int64_t, double);
- GDVIRTUAL2RC(double, font_get_descent, RID, int64_t);
+ GDVIRTUAL3(_font_set_descent, RID, int64_t, double);
+ GDVIRTUAL2RC(double, _font_get_descent, RID, int64_t);
virtual void font_set_underline_position(const RID &p_font_rid, int64_t p_size, double p_underline_position) override;
virtual double font_get_underline_position(const RID &p_font_rid, int64_t p_size) const override;
- GDVIRTUAL3(font_set_underline_position, RID, int64_t, double);
- GDVIRTUAL2RC(double, font_get_underline_position, RID, int64_t);
+ GDVIRTUAL3(_font_set_underline_position, RID, int64_t, double);
+ GDVIRTUAL2RC(double, _font_get_underline_position, RID, int64_t);
virtual void font_set_underline_thickness(const RID &p_font_rid, int64_t p_size, double p_underline_thickness) override;
virtual double font_get_underline_thickness(const RID &p_font_rid, int64_t p_size) const override;
- GDVIRTUAL3(font_set_underline_thickness, RID, int64_t, double);
- GDVIRTUAL2RC(double, font_get_underline_thickness, RID, int64_t);
+ GDVIRTUAL3(_font_set_underline_thickness, RID, int64_t, double);
+ GDVIRTUAL2RC(double, _font_get_underline_thickness, RID, int64_t);
virtual void font_set_scale(const RID &p_font_rid, int64_t p_size, double p_scale) override;
virtual double font_get_scale(const RID &p_font_rid, int64_t p_size) const override;
- GDVIRTUAL3(font_set_scale, RID, int64_t, double);
- GDVIRTUAL2RC(double, font_get_scale, RID, int64_t);
+ GDVIRTUAL3(_font_set_scale, RID, int64_t, double);
+ GDVIRTUAL2RC(double, _font_get_scale, RID, int64_t);
virtual int64_t font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const override;
virtual void font_clear_textures(const RID &p_font_rid, const Vector2i &p_size) override;
virtual void font_remove_texture(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) override;
- GDVIRTUAL2RC(int64_t, font_get_texture_count, RID, const Vector2i &);
- GDVIRTUAL2(font_clear_textures, RID, const Vector2i &);
- GDVIRTUAL3(font_remove_texture, RID, const Vector2i &, int64_t);
+ GDVIRTUAL2RC(int64_t, _font_get_texture_count, RID, const Vector2i &);
+ GDVIRTUAL2(_font_clear_textures, RID, const Vector2i &);
+ GDVIRTUAL3(_font_remove_texture, RID, const Vector2i &, int64_t);
virtual void font_set_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const Ref<Image> &p_image) override;
virtual Ref<Image> font_get_texture_image(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
- GDVIRTUAL4(font_set_texture_image, RID, const Vector2i &, int64_t, const Ref<Image> &);
- GDVIRTUAL3RC(Ref<Image>, font_get_texture_image, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_set_texture_image, RID, const Vector2i &, int64_t, const Ref<Image> &);
+ GDVIRTUAL3RC(Ref<Image>, _font_get_texture_image, RID, const Vector2i &, int64_t);
virtual void font_set_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index, const PackedInt32Array &p_offset) override;
virtual PackedInt32Array font_get_texture_offsets(const RID &p_font_rid, const Vector2i &p_size, int64_t p_texture_index) const override;
- GDVIRTUAL4(font_set_texture_offsets, RID, const Vector2i &, int64_t, const PackedInt32Array &);
- GDVIRTUAL3RC(PackedInt32Array, font_get_texture_offsets, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_set_texture_offsets, RID, const Vector2i &, int64_t, const PackedInt32Array &);
+ GDVIRTUAL3RC(PackedInt32Array, _font_get_texture_offsets, RID, const Vector2i &, int64_t);
virtual PackedInt32Array font_get_glyph_list(const RID &p_font_rid, const Vector2i &p_size) const override;
virtual void font_clear_glyphs(const RID &p_font_rid, const Vector2i &p_size) override;
virtual void font_remove_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) override;
- GDVIRTUAL2RC(PackedInt32Array, font_get_glyph_list, RID, const Vector2i &);
- GDVIRTUAL2(font_clear_glyphs, RID, const Vector2i &);
- GDVIRTUAL3(font_remove_glyph, RID, const Vector2i &, int64_t);
+ GDVIRTUAL2RC(PackedInt32Array, _font_get_glyph_list, RID, const Vector2i &);
+ GDVIRTUAL2(_font_clear_glyphs, RID, const Vector2i &);
+ GDVIRTUAL3(_font_remove_glyph, RID, const Vector2i &, int64_t);
virtual Vector2 font_get_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph) const override;
virtual void font_set_glyph_advance(const RID &p_font_rid, int64_t p_size, int64_t p_glyph, const Vector2 &p_advance) override;
- GDVIRTUAL3RC(Vector2, font_get_glyph_advance, RID, int64_t, int64_t);
- GDVIRTUAL4(font_set_glyph_advance, RID, int64_t, int64_t, const Vector2 &);
+ GDVIRTUAL3RC(Vector2, _font_get_glyph_advance, RID, int64_t, int64_t);
+ GDVIRTUAL4(_font_set_glyph_advance, RID, int64_t, int64_t, const Vector2 &);
virtual Vector2 font_get_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
virtual void font_set_glyph_offset(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_offset) override;
- GDVIRTUAL3RC(Vector2, font_get_glyph_offset, RID, const Vector2i &, int64_t);
- GDVIRTUAL4(font_set_glyph_offset, RID, const Vector2i &, int64_t, const Vector2 &);
+ GDVIRTUAL3RC(Vector2, _font_get_glyph_offset, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_set_glyph_offset, RID, const Vector2i &, int64_t, const Vector2 &);
virtual Vector2 font_get_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
virtual void font_set_glyph_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Vector2 &p_gl_size) override;
- GDVIRTUAL3RC(Vector2, font_get_glyph_size, RID, const Vector2i &, int64_t);
- GDVIRTUAL4(font_set_glyph_size, RID, const Vector2i &, int64_t, const Vector2 &);
+ GDVIRTUAL3RC(Vector2, _font_get_glyph_size, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_set_glyph_size, RID, const Vector2i &, int64_t, const Vector2 &);
virtual Rect2 font_get_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
virtual void font_set_glyph_uv_rect(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, const Rect2 &p_uv_rect) override;
- GDVIRTUAL3RC(Rect2, font_get_glyph_uv_rect, RID, const Vector2i &, int64_t);
- GDVIRTUAL4(font_set_glyph_uv_rect, RID, const Vector2i &, int64_t, const Rect2 &);
+ GDVIRTUAL3RC(Rect2, _font_get_glyph_uv_rect, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_set_glyph_uv_rect, RID, const Vector2i &, int64_t, const Rect2 &);
virtual int64_t font_get_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
virtual void font_set_glyph_texture_idx(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph, int64_t p_texture_idx) override;
- GDVIRTUAL3RC(int64_t, font_get_glyph_texture_idx, RID, const Vector2i &, int64_t);
- GDVIRTUAL4(font_set_glyph_texture_idx, RID, const Vector2i &, int64_t, int64_t);
+ GDVIRTUAL3RC(int64_t, _font_get_glyph_texture_idx, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_set_glyph_texture_idx, RID, const Vector2i &, int64_t, int64_t);
virtual RID font_get_glyph_texture_rid(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- GDVIRTUAL3RC(RID, font_get_glyph_texture_rid, RID, const Vector2i &, int64_t);
+ GDVIRTUAL3RC(RID, _font_get_glyph_texture_rid, RID, const Vector2i &, int64_t);
virtual Size2 font_get_glyph_texture_size(const RID &p_font_rid, const Vector2i &p_size, int64_t p_glyph) const override;
- GDVIRTUAL3RC(Size2, font_get_glyph_texture_size, RID, const Vector2i &, int64_t);
+ GDVIRTUAL3RC(Size2, _font_get_glyph_texture_size, RID, const Vector2i &, int64_t);
virtual Dictionary font_get_glyph_contours(const RID &p_font, int64_t p_size, int64_t p_index) const override;
- GDVIRTUAL3RC(Dictionary, font_get_glyph_contours, RID, int64_t, int64_t);
+ GDVIRTUAL3RC(Dictionary, _font_get_glyph_contours, RID, int64_t, int64_t);
virtual TypedArray<Vector2i> font_get_kerning_list(const RID &p_font_rid, int64_t p_size) const override;
virtual void font_clear_kerning_map(const RID &p_font_rid, int64_t p_size) override;
virtual void font_remove_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) override;
- GDVIRTUAL2RC(TypedArray<Vector2i>, font_get_kerning_list, RID, int64_t);
- GDVIRTUAL2(font_clear_kerning_map, RID, int64_t);
- GDVIRTUAL3(font_remove_kerning, RID, int64_t, const Vector2i &);
+ GDVIRTUAL2RC(TypedArray<Vector2i>, _font_get_kerning_list, RID, int64_t);
+ GDVIRTUAL2(_font_clear_kerning_map, RID, int64_t);
+ GDVIRTUAL3(_font_remove_kerning, RID, int64_t, const Vector2i &);
virtual void font_set_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
virtual Vector2 font_get_kerning(const RID &p_font_rid, int64_t p_size, const Vector2i &p_glyph_pair) const override;
- GDVIRTUAL4(font_set_kerning, RID, int64_t, const Vector2i &, const Vector2 &);
- GDVIRTUAL3RC(Vector2, font_get_kerning, RID, int64_t, const Vector2i &);
+ GDVIRTUAL4(_font_set_kerning, RID, int64_t, const Vector2i &, const Vector2 &);
+ GDVIRTUAL3RC(Vector2, _font_get_kerning, RID, int64_t, const Vector2i &);
virtual int64_t font_get_glyph_index(const RID &p_font_rid, int64_t p_size, int64_t p_char, int64_t p_variation_selector = 0) const override;
- GDVIRTUAL4RC(int64_t, font_get_glyph_index, RID, int64_t, int64_t, int64_t);
+ GDVIRTUAL4RC(int64_t, _font_get_glyph_index, RID, int64_t, int64_t, int64_t);
virtual bool font_has_char(const RID &p_font_rid, int64_t p_char) const override;
virtual String font_get_supported_chars(const RID &p_font_rid) const override;
- GDVIRTUAL2RC(bool, font_has_char, RID, int64_t);
- GDVIRTUAL1RC(String, font_get_supported_chars, RID);
+ GDVIRTUAL2RC(bool, _font_has_char, RID, int64_t);
+ GDVIRTUAL1RC(String, _font_get_supported_chars, RID);
virtual void font_render_range(const RID &p_font, const Vector2i &p_size, int64_t p_start, int64_t p_end) override;
virtual void font_render_glyph(const RID &p_font_rid, const Vector2i &p_size, int64_t p_index) override;
- GDVIRTUAL4(font_render_range, RID, const Vector2i &, int64_t, int64_t);
- GDVIRTUAL3(font_render_glyph, RID, const Vector2i &, int64_t);
+ GDVIRTUAL4(_font_render_range, RID, const Vector2i &, int64_t, int64_t);
+ GDVIRTUAL3(_font_render_glyph, RID, const Vector2i &, int64_t);
virtual void font_draw_glyph(const RID &p_font, const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
virtual void font_draw_glyph_outline(const RID &p_font, const RID &p_canvas, int64_t p_size, int64_t p_outline_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- GDVIRTUAL6C(font_draw_glyph, RID, RID, int64_t, const Vector2 &, int64_t, const Color &);
- GDVIRTUAL7C(font_draw_glyph_outline, RID, RID, int64_t, int64_t, const Vector2 &, int64_t, const Color &);
+ GDVIRTUAL6C(_font_draw_glyph, RID, RID, int64_t, const Vector2 &, int64_t, const Color &);
+ GDVIRTUAL7C(_font_draw_glyph_outline, RID, RID, int64_t, int64_t, const Vector2 &, int64_t, const Color &);
virtual bool font_is_language_supported(const RID &p_font_rid, const String &p_language) const override;
virtual void font_set_language_support_override(const RID &p_font_rid, const String &p_language, bool p_supported) override;
virtual bool font_get_language_support_override(const RID &p_font_rid, const String &p_language) override;
virtual void font_remove_language_support_override(const RID &p_font_rid, const String &p_language) override;
virtual PackedStringArray font_get_language_support_overrides(const RID &p_font_rid) override;
- GDVIRTUAL2RC(bool, font_is_language_supported, RID, const String &);
- GDVIRTUAL3(font_set_language_support_override, RID, const String &, bool);
- GDVIRTUAL2R(bool, font_get_language_support_override, RID, const String &);
- GDVIRTUAL2(font_remove_language_support_override, RID, const String &);
- GDVIRTUAL1R(PackedStringArray, font_get_language_support_overrides, RID);
+ GDVIRTUAL2RC(bool, _font_is_language_supported, RID, const String &);
+ GDVIRTUAL3(_font_set_language_support_override, RID, const String &, bool);
+ GDVIRTUAL2R(bool, _font_get_language_support_override, RID, const String &);
+ GDVIRTUAL2(_font_remove_language_support_override, RID, const String &);
+ GDVIRTUAL1R(PackedStringArray, _font_get_language_support_overrides, RID);
virtual bool font_is_script_supported(const RID &p_font_rid, const String &p_script) const override;
virtual void font_set_script_support_override(const RID &p_font_rid, const String &p_script, bool p_supported) override;
virtual bool font_get_script_support_override(const RID &p_font_rid, const String &p_script) override;
virtual void font_remove_script_support_override(const RID &p_font_rid, const String &p_script) override;
virtual PackedStringArray font_get_script_support_overrides(const RID &p_font_rid) override;
- GDVIRTUAL2RC(bool, font_is_script_supported, RID, const String &);
- GDVIRTUAL3(font_set_script_support_override, RID, const String &, bool);
- GDVIRTUAL2R(bool, font_get_script_support_override, RID, const String &);
- GDVIRTUAL2(font_remove_script_support_override, RID, const String &);
- GDVIRTUAL1R(PackedStringArray, font_get_script_support_overrides, RID);
+ GDVIRTUAL2RC(bool, _font_is_script_supported, RID, const String &);
+ GDVIRTUAL3(_font_set_script_support_override, RID, const String &, bool);
+ GDVIRTUAL2R(bool, _font_get_script_support_override, RID, const String &);
+ GDVIRTUAL2(_font_remove_script_support_override, RID, const String &);
+ GDVIRTUAL1R(PackedStringArray, _font_get_script_support_overrides, RID);
virtual void font_set_opentype_feature_overrides(const RID &p_font_rid, const Dictionary &p_overrides) override;
virtual Dictionary font_get_opentype_feature_overrides(const RID &p_font_rid) const override;
- GDVIRTUAL2(font_set_opentype_feature_overrides, RID, const Dictionary &);
- GDVIRTUAL1RC(Dictionary, font_get_opentype_feature_overrides, RID);
+ GDVIRTUAL2(_font_set_opentype_feature_overrides, RID, const Dictionary &);
+ GDVIRTUAL1RC(Dictionary, _font_get_opentype_feature_overrides, RID);
virtual Dictionary font_supported_feature_list(const RID &p_font_rid) const override;
virtual Dictionary font_supported_variation_list(const RID &p_font_rid) const override;
- GDVIRTUAL1RC(Dictionary, font_supported_feature_list, RID);
- GDVIRTUAL1RC(Dictionary, font_supported_variation_list, RID);
+ GDVIRTUAL1RC(Dictionary, _font_supported_feature_list, RID);
+ GDVIRTUAL1RC(Dictionary, _font_supported_variation_list, RID);
virtual double font_get_global_oversampling() const override;
virtual void font_set_global_oversampling(double p_oversampling) override;
- GDVIRTUAL0RC(double, font_get_global_oversampling);
- GDVIRTUAL1(font_set_global_oversampling, double);
+ GDVIRTUAL0RC(double, _font_get_global_oversampling);
+ GDVIRTUAL1(_font_set_global_oversampling, double);
virtual Vector2 get_hex_code_box_size(int64_t p_size, int64_t p_index) const override;
virtual void draw_hex_code_box(const RID &p_canvas, int64_t p_size, const Vector2 &p_pos, int64_t p_index, const Color &p_color) const override;
- GDVIRTUAL2RC(Vector2, get_hex_code_box_size, int64_t, int64_t);
- GDVIRTUAL5C(draw_hex_code_box, RID, int64_t, const Vector2 &, int64_t, const Color &);
+ GDVIRTUAL2RC(Vector2, _get_hex_code_box_size, int64_t, int64_t);
+ GDVIRTUAL5C(_draw_hex_code_box, RID, int64_t, const Vector2 &, int64_t, const Color &);
/* Shaped text buffer interface */
virtual RID create_shaped_text(Direction p_direction = DIRECTION_AUTO, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
- GDVIRTUAL2R(RID, create_shaped_text, Direction, Orientation);
+ GDVIRTUAL2R(RID, _create_shaped_text, Direction, Orientation);
virtual void shaped_text_clear(const RID &p_shaped) override;
- GDVIRTUAL1(shaped_text_clear, RID);
+ GDVIRTUAL1(_shaped_text_clear, RID);
virtual void shaped_text_set_direction(const RID &p_shaped, Direction p_direction = DIRECTION_AUTO) override;
virtual Direction shaped_text_get_direction(const RID &p_shaped) const override;
virtual Direction shaped_text_get_inferred_direction(const RID &p_shaped) const override;
- GDVIRTUAL2(shaped_text_set_direction, RID, Direction);
- GDVIRTUAL1RC(Direction, shaped_text_get_direction, RID);
- GDVIRTUAL1RC(Direction, shaped_text_get_inferred_direction, RID);
+ GDVIRTUAL2(_shaped_text_set_direction, RID, Direction);
+ GDVIRTUAL1RC(Direction, _shaped_text_get_direction, RID);
+ GDVIRTUAL1RC(Direction, _shaped_text_get_inferred_direction, RID);
virtual void shaped_text_set_bidi_override(const RID &p_shaped, const Array &p_override) override;
- GDVIRTUAL2(shaped_text_set_bidi_override, RID, const Array &);
+ GDVIRTUAL2(_shaped_text_set_bidi_override, RID, const Array &);
virtual void shaped_text_set_custom_punctuation(const RID &p_shaped, const String &p_punct) override;
virtual String shaped_text_get_custom_punctuation(const RID &p_shaped) const override;
- GDVIRTUAL2(shaped_text_set_custom_punctuation, RID, String);
- GDVIRTUAL1RC(String, shaped_text_get_custom_punctuation, RID);
+ GDVIRTUAL2(_shaped_text_set_custom_punctuation, RID, String);
+ GDVIRTUAL1RC(String, _shaped_text_get_custom_punctuation, RID);
virtual void shaped_text_set_orientation(const RID &p_shaped, Orientation p_orientation = ORIENTATION_HORIZONTAL) override;
virtual Orientation shaped_text_get_orientation(const RID &p_shaped) const override;
- GDVIRTUAL2(shaped_text_set_orientation, RID, Orientation);
- GDVIRTUAL1RC(Orientation, shaped_text_get_orientation, RID);
+ GDVIRTUAL2(_shaped_text_set_orientation, RID, Orientation);
+ GDVIRTUAL1RC(Orientation, _shaped_text_get_orientation, RID);
virtual void shaped_text_set_preserve_invalid(const RID &p_shaped, bool p_enabled) override;
virtual bool shaped_text_get_preserve_invalid(const RID &p_shaped) const override;
- GDVIRTUAL2(shaped_text_set_preserve_invalid, RID, bool);
- GDVIRTUAL1RC(bool, shaped_text_get_preserve_invalid, RID);
+ GDVIRTUAL2(_shaped_text_set_preserve_invalid, RID, bool);
+ GDVIRTUAL1RC(bool, _shaped_text_get_preserve_invalid, RID);
virtual void shaped_text_set_preserve_control(const RID &p_shaped, bool p_enabled) override;
virtual bool shaped_text_get_preserve_control(const RID &p_shaped) const override;
- GDVIRTUAL2(shaped_text_set_preserve_control, RID, bool);
- GDVIRTUAL1RC(bool, shaped_text_get_preserve_control, RID);
+ GDVIRTUAL2(_shaped_text_set_preserve_control, RID, bool);
+ GDVIRTUAL1RC(bool, _shaped_text_get_preserve_control, RID);
virtual void shaped_text_set_spacing(const RID &p_shaped, SpacingType p_spacing, int64_t p_value) override;
virtual int64_t shaped_text_get_spacing(const RID &p_shaped, SpacingType p_spacing) const override;
- GDVIRTUAL3(shaped_text_set_spacing, RID, SpacingType, int64_t);
- GDVIRTUAL2RC(int64_t, shaped_text_get_spacing, RID, SpacingType);
+ GDVIRTUAL3(_shaped_text_set_spacing, RID, SpacingType, int64_t);
+ GDVIRTUAL2RC(int64_t, _shaped_text_get_spacing, RID, SpacingType);
virtual bool shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary(), const String &p_language = "", const Variant &p_meta = Variant()) override;
virtual bool shaped_text_add_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER, int64_t p_length = 1) override;
virtual bool shaped_text_resize_object(const RID &p_shaped, const Variant &p_key, const Size2 &p_size, InlineAlignment p_inline_align = INLINE_ALIGNMENT_CENTER) override;
- GDVIRTUAL7R(bool, shaped_text_add_string, RID, const String &, const TypedArray<RID> &, int64_t, const Dictionary &, const String &, const Variant &);
- GDVIRTUAL5R(bool, shaped_text_add_object, RID, const Variant &, const Size2 &, InlineAlignment, int64_t);
- GDVIRTUAL4R(bool, shaped_text_resize_object, RID, const Variant &, const Size2 &, InlineAlignment);
+ GDVIRTUAL7R(bool, _shaped_text_add_string, RID, const String &, const TypedArray<RID> &, int64_t, const Dictionary &, const String &, const Variant &);
+ GDVIRTUAL5R(bool, _shaped_text_add_object, RID, const Variant &, const Size2 &, InlineAlignment, int64_t);
+ GDVIRTUAL4R(bool, _shaped_text_resize_object, RID, const Variant &, const Size2 &, InlineAlignment);
virtual int64_t shaped_get_span_count(const RID &p_shaped) const override;
virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const override;
virtual void shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary()) override;
- GDVIRTUAL1RC(int64_t, shaped_get_span_count, RID);
- GDVIRTUAL2RC(Variant, shaped_get_span_meta, RID, int64_t);
- GDVIRTUAL5(shaped_set_span_update_font, RID, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &);
+ GDVIRTUAL1RC(int64_t, _shaped_get_span_count, RID);
+ GDVIRTUAL2RC(Variant, _shaped_get_span_meta, RID, int64_t);
+ GDVIRTUAL5(_shaped_set_span_update_font, RID, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &);
virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const override;
virtual RID shaped_text_get_parent(const RID &p_shaped) const override;
- GDVIRTUAL3RC(RID, shaped_text_substr, RID, int64_t, int64_t);
- GDVIRTUAL1RC(RID, shaped_text_get_parent, RID);
+ GDVIRTUAL3RC(RID, _shaped_text_substr, RID, int64_t, int64_t);
+ GDVIRTUAL1RC(RID, _shaped_text_get_parent, RID);
virtual double shaped_text_fit_to_width(const RID &p_shaped, double p_width, BitField<TextServer::JustificationFlag> p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
virtual double shaped_text_tab_align(const RID &p_shaped, const PackedFloat32Array &p_tab_stops) override;
- GDVIRTUAL3R(double, shaped_text_fit_to_width, RID, double, BitField<TextServer::JustificationFlag>);
- GDVIRTUAL2R(double, shaped_text_tab_align, RID, const PackedFloat32Array &);
+ GDVIRTUAL3R(double, _shaped_text_fit_to_width, RID, double, BitField<TextServer::JustificationFlag>);
+ GDVIRTUAL2R(double, _shaped_text_tab_align, RID, const PackedFloat32Array &);
virtual bool shaped_text_shape(const RID &p_shaped) override;
virtual bool shaped_text_update_breaks(const RID &p_shaped) override;
virtual bool shaped_text_update_justification_ops(const RID &p_shaped) override;
- GDVIRTUAL1R(bool, shaped_text_shape, RID);
- GDVIRTUAL1R(bool, shaped_text_update_breaks, RID);
- GDVIRTUAL1R(bool, shaped_text_update_justification_ops, RID);
+ GDVIRTUAL1R(bool, _shaped_text_shape, RID);
+ GDVIRTUAL1R(bool, _shaped_text_update_breaks, RID);
+ GDVIRTUAL1R(bool, _shaped_text_update_justification_ops, RID);
virtual bool shaped_text_is_ready(const RID &p_shaped) const override;
- GDVIRTUAL1RC(bool, shaped_text_is_ready, RID);
+ GDVIRTUAL1RC(bool, _shaped_text_is_ready, RID);
virtual const Glyph *shaped_text_get_glyphs(const RID &p_shaped) const override;
virtual const Glyph *shaped_text_sort_logical(const RID &p_shaped) override;
virtual int64_t shaped_text_get_glyph_count(const RID &p_shaped) const override;
- GDVIRTUAL1RC(GDNativeConstPtr<const Glyph>, shaped_text_get_glyphs, RID);
- GDVIRTUAL1R(GDNativeConstPtr<const Glyph>, shaped_text_sort_logical, RID);
- GDVIRTUAL1RC(int64_t, shaped_text_get_glyph_count, RID);
+ GDVIRTUAL1RC(GDNativeConstPtr<const Glyph>, _shaped_text_get_glyphs, RID);
+ GDVIRTUAL1R(GDNativeConstPtr<const Glyph>, _shaped_text_sort_logical, RID);
+ GDVIRTUAL1RC(int64_t, _shaped_text_get_glyph_count, RID);
virtual Vector2i shaped_text_get_range(const RID &p_shaped) const override;
- GDVIRTUAL1RC(Vector2i, shaped_text_get_range, RID);
+ GDVIRTUAL1RC(Vector2i, _shaped_text_get_range, RID);
virtual PackedInt32Array shaped_text_get_line_breaks_adv(const RID &p_shaped, const PackedFloat32Array &p_width, int64_t p_start = 0, bool p_once = true, BitField<TextServer::LineBreakFlag> p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
virtual PackedInt32Array shaped_text_get_line_breaks(const RID &p_shaped, double p_width, int64_t p_start = 0, BitField<TextServer::LineBreakFlag> p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
virtual PackedInt32Array shaped_text_get_word_breaks(const RID &p_shaped, BitField<TextServer::GraphemeFlag> p_grapheme_flags = GRAPHEME_IS_SPACE | GRAPHEME_IS_PUNCTUATION) const override;
- GDVIRTUAL5RC(PackedInt32Array, shaped_text_get_line_breaks_adv, RID, const PackedFloat32Array &, int64_t, bool, BitField<TextServer::LineBreakFlag>);
- GDVIRTUAL4RC(PackedInt32Array, shaped_text_get_line_breaks, RID, double, int64_t, BitField<TextServer::LineBreakFlag>);
- GDVIRTUAL2RC(PackedInt32Array, shaped_text_get_word_breaks, RID, BitField<TextServer::GraphemeFlag>);
+ GDVIRTUAL5RC(PackedInt32Array, _shaped_text_get_line_breaks_adv, RID, const PackedFloat32Array &, int64_t, bool, BitField<TextServer::LineBreakFlag>);
+ GDVIRTUAL4RC(PackedInt32Array, _shaped_text_get_line_breaks, RID, double, int64_t, BitField<TextServer::LineBreakFlag>);
+ GDVIRTUAL2RC(PackedInt32Array, _shaped_text_get_word_breaks, RID, BitField<TextServer::GraphemeFlag>);
virtual int64_t shaped_text_get_trim_pos(const RID &p_shaped) const override;
virtual int64_t shaped_text_get_ellipsis_pos(const RID &p_shaped) const override;
virtual const Glyph *shaped_text_get_ellipsis_glyphs(const RID &p_shaped) const override;
virtual int64_t shaped_text_get_ellipsis_glyph_count(const RID &p_shaped) const override;
- GDVIRTUAL1RC(int64_t, shaped_text_get_trim_pos, RID);
- GDVIRTUAL1RC(int64_t, shaped_text_get_ellipsis_pos, RID);
- GDVIRTUAL1RC(GDNativeConstPtr<const Glyph>, shaped_text_get_ellipsis_glyphs, RID);
- GDVIRTUAL1RC(int64_t, shaped_text_get_ellipsis_glyph_count, RID);
+ GDVIRTUAL1RC(int64_t, _shaped_text_get_trim_pos, RID);
+ GDVIRTUAL1RC(int64_t, _shaped_text_get_ellipsis_pos, RID);
+ GDVIRTUAL1RC(GDNativeConstPtr<const Glyph>, _shaped_text_get_ellipsis_glyphs, RID);
+ GDVIRTUAL1RC(int64_t, _shaped_text_get_ellipsis_glyph_count, RID);
virtual void shaped_text_overrun_trim_to_width(const RID &p_shaped, double p_width, BitField<TextServer::TextOverrunFlag> p_trim_flags) override;
- GDVIRTUAL3(shaped_text_overrun_trim_to_width, RID, double, BitField<TextServer::TextOverrunFlag>);
+ GDVIRTUAL3(_shaped_text_overrun_trim_to_width, RID, double, BitField<TextServer::TextOverrunFlag>);
virtual Array shaped_text_get_objects(const RID &p_shaped) const override;
virtual Rect2 shaped_text_get_object_rect(const RID &p_shaped, const Variant &p_key) const override;
- GDVIRTUAL1RC(Array, shaped_text_get_objects, RID);
- GDVIRTUAL2RC(Rect2, shaped_text_get_object_rect, RID, const Variant &);
+ GDVIRTUAL1RC(Array, _shaped_text_get_objects, RID);
+ GDVIRTUAL2RC(Rect2, _shaped_text_get_object_rect, RID, const Variant &);
virtual Size2 shaped_text_get_size(const RID &p_shaped) const override;
virtual double shaped_text_get_ascent(const RID &p_shaped) const override;
@@ -452,66 +453,66 @@ public:
virtual double shaped_text_get_width(const RID &p_shaped) const override;
virtual double shaped_text_get_underline_position(const RID &p_shaped) const override;
virtual double shaped_text_get_underline_thickness(const RID &p_shaped) const override;
- GDVIRTUAL1RC(Size2, shaped_text_get_size, RID);
- GDVIRTUAL1RC(double, shaped_text_get_ascent, RID);
- GDVIRTUAL1RC(double, shaped_text_get_descent, RID);
- GDVIRTUAL1RC(double, shaped_text_get_width, RID);
- GDVIRTUAL1RC(double, shaped_text_get_underline_position, RID);
- GDVIRTUAL1RC(double, shaped_text_get_underline_thickness, RID);
+ GDVIRTUAL1RC(Size2, _shaped_text_get_size, RID);
+ GDVIRTUAL1RC(double, _shaped_text_get_ascent, RID);
+ GDVIRTUAL1RC(double, _shaped_text_get_descent, RID);
+ GDVIRTUAL1RC(double, _shaped_text_get_width, RID);
+ GDVIRTUAL1RC(double, _shaped_text_get_underline_position, RID);
+ GDVIRTUAL1RC(double, _shaped_text_get_underline_thickness, RID);
virtual Direction shaped_text_get_dominant_direction_in_range(const RID &p_shaped, int64_t p_start, int64_t p_end) const override;
- GDVIRTUAL3RC(int64_t, shaped_text_get_dominant_direction_in_range, RID, int64_t, int64_t);
+ GDVIRTUAL3RC(int64_t, _shaped_text_get_dominant_direction_in_range, RID, int64_t, int64_t);
virtual CaretInfo shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const override;
virtual Vector<Vector2> shaped_text_get_selection(const RID &p_shaped, int64_t p_start, int64_t p_end) const override;
- GDVIRTUAL3C(shaped_text_get_carets, RID, int64_t, GDNativePtr<CaretInfo>);
- GDVIRTUAL3RC(Vector<Vector2>, shaped_text_get_selection, RID, int64_t, int64_t);
+ GDVIRTUAL3C(_shaped_text_get_carets, RID, int64_t, GDNativePtr<CaretInfo>);
+ GDVIRTUAL3RC(Vector<Vector2>, _shaped_text_get_selection, RID, int64_t, int64_t);
virtual int64_t shaped_text_hit_test_grapheme(const RID &p_shaped, double p_coords) const override;
virtual int64_t shaped_text_hit_test_position(const RID &p_shaped, double p_coords) const override;
- GDVIRTUAL2RC(int64_t, shaped_text_hit_test_grapheme, RID, double);
- GDVIRTUAL2RC(int64_t, shaped_text_hit_test_position, RID, double);
+ GDVIRTUAL2RC(int64_t, _shaped_text_hit_test_grapheme, RID, double);
+ GDVIRTUAL2RC(int64_t, _shaped_text_hit_test_position, RID, double);
virtual void shaped_text_draw(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l = -1.0, double p_clip_r = -1.0, const Color &p_color = Color(1, 1, 1)) const override;
virtual void shaped_text_draw_outline(const RID &p_shaped, const RID &p_canvas, const Vector2 &p_pos, double p_clip_l = -1.0, double p_clip_r = -1.0, int64_t p_outline_size = 1, const Color &p_color = Color(1, 1, 1)) const override;
- GDVIRTUAL6C(shaped_text_draw, RID, RID, const Vector2 &, double, double, const Color &);
- GDVIRTUAL7C(shaped_text_draw_outline, RID, RID, const Vector2 &, double, double, int64_t, const Color &);
+ GDVIRTUAL6C(_shaped_text_draw, RID, RID, const Vector2 &, double, double, const Color &);
+ GDVIRTUAL7C(_shaped_text_draw_outline, RID, RID, const Vector2 &, double, double, int64_t, const Color &);
virtual Vector2 shaped_text_get_grapheme_bounds(const RID &p_shaped, int64_t p_pos) const override;
virtual int64_t shaped_text_next_grapheme_pos(const RID &p_shaped, int64_t p_pos) const override;
virtual int64_t shaped_text_prev_grapheme_pos(const RID &p_shaped, int64_t p_pos) const override;
- GDVIRTUAL2RC(Vector2, shaped_text_get_grapheme_bounds, RID, int64_t);
- GDVIRTUAL2RC(int64_t, shaped_text_next_grapheme_pos, RID, int64_t);
- GDVIRTUAL2RC(int64_t, shaped_text_prev_grapheme_pos, RID, int64_t);
+ GDVIRTUAL2RC(Vector2, _shaped_text_get_grapheme_bounds, RID, int64_t);
+ GDVIRTUAL2RC(int64_t, _shaped_text_next_grapheme_pos, RID, int64_t);
+ GDVIRTUAL2RC(int64_t, _shaped_text_prev_grapheme_pos, RID, int64_t);
virtual String format_number(const String &p_string, const String &p_language = "") const override;
virtual String parse_number(const String &p_string, const String &p_language = "") const override;
virtual String percent_sign(const String &p_language = "") const override;
- GDVIRTUAL2RC(String, format_number, const String &, const String &);
- GDVIRTUAL2RC(String, parse_number, const String &, const String &);
- GDVIRTUAL1RC(String, percent_sign, const String &);
+ GDVIRTUAL2RC(String, _format_number, const String &, const String &);
+ GDVIRTUAL2RC(String, _parse_number, const String &, const String &);
+ GDVIRTUAL1RC(String, _percent_sign, const String &);
virtual String strip_diacritics(const String &p_string) const override;
- GDVIRTUAL1RC(String, strip_diacritics, const String &);
+ GDVIRTUAL1RC(String, _strip_diacritics, const String &);
virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "") const override;
- GDVIRTUAL2RC(PackedInt32Array, string_get_word_breaks, const String &, const String &);
+ GDVIRTUAL2RC(PackedInt32Array, _string_get_word_breaks, const String &, const String &);
virtual bool is_valid_identifier(const String &p_string) const override;
- GDVIRTUAL1RC(bool, is_valid_identifier, const String &);
+ GDVIRTUAL1RC(bool, _is_valid_identifier, const String &);
virtual String string_to_upper(const String &p_string, const String &p_language = "") const override;
virtual String string_to_lower(const String &p_string, const String &p_language = "") const override;
- GDVIRTUAL2RC(String, string_to_upper, const String &, const String &);
- GDVIRTUAL2RC(String, string_to_lower, const String &, const String &);
+ GDVIRTUAL2RC(String, _string_to_upper, const String &, const String &);
+ GDVIRTUAL2RC(String, _string_to_lower, const String &, const String &);
TypedArray<Vector2i> parse_structured_text(StructuredTextParser p_parser_type, const Array &p_args, const String &p_text) const;
- GDVIRTUAL3RC(TypedArray<Vector2i>, parse_structured_text, StructuredTextParser, const Array &, const String &);
+ GDVIRTUAL3RC(TypedArray<Vector2i>, _parse_structured_text, StructuredTextParser, const Array &, const String &);
virtual int64_t is_confusable(const String &p_string, const PackedStringArray &p_dict) const override;
virtual bool spoof_check(const String &p_string) const override;
- GDVIRTUAL2RC(int64_t, is_confusable, const String &, const PackedStringArray &);
- GDVIRTUAL1RC(bool, spoof_check, const String &);
+ GDVIRTUAL2RC(int64_t, _is_confusable, const String &, const PackedStringArray &);
+ GDVIRTUAL1RC(bool, _spoof_check, const String &);
TextServerExtension();
~TextServerExtension();
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index 660247839c..588c837a40 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -468,6 +468,7 @@ void TextServer::_bind_methods() {
BIND_ENUM_CONSTANT(FONT_LCD_SUBPIXEL_LAYOUT_HBGR);
BIND_ENUM_CONSTANT(FONT_LCD_SUBPIXEL_LAYOUT_VRGB);
BIND_ENUM_CONSTANT(FONT_LCD_SUBPIXEL_LAYOUT_VBGR);
+ BIND_ENUM_CONSTANT(FONT_LCD_SUBPIXEL_LAYOUT_MAX);
/* Direction */
BIND_ENUM_CONSTANT(DIRECTION_AUTO);
diff --git a/servers/text_server.h b/servers/text_server.h
index a0624c2c05..a4e6080fd0 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -230,6 +230,7 @@ public:
virtual String tag_to_name(int64_t p_tag) const { return ""; };
/* Font interface */
+
virtual RID create_font() = 0;
virtual void font_set_data(const RID &p_font_rid, const PackedByteArray &p_data) = 0;
@@ -249,8 +250,8 @@ public:
virtual void font_set_style_name(const RID &p_font_rid, const String &p_name) = 0;
virtual String font_get_style_name(const RID &p_font_rid) const = 0;
- virtual void font_set_antialiasing(RID p_font_rid, FontAntialiasing p_antialiasing) = 0;
- virtual FontAntialiasing font_get_antialiasing(RID p_font_rid) const = 0;
+ virtual void font_set_antialiasing(const RID &p_font_rid, FontAntialiasing p_antialiasing) = 0;
+ virtual FontAntialiasing font_get_antialiasing(const RID &p_font_rid) const = 0;
virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) = 0;
virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const = 0;
diff --git a/tests/core/object/test_class_db.h b/tests/core/object/test_class_db.h
index 208923edb9..b0375c63b9 100644
--- a/tests/core/object/test_class_db.h
+++ b/tests/core/object/test_class_db.h
@@ -666,6 +666,10 @@ void add_exposed_classes(Context &r_context) {
} else {
exposed_class.methods.push_back(method);
}
+
+ if (method.is_virtual) {
+ TEST_COND(String(method.name)[0] != '_', "Virtual method ", String(method.name), " does not start with underscore.");
+ }
}
// Add signals