summaryrefslogtreecommitdiff
path: root/doc/classes/TextServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/TextServer.xml')
-rw-r--r--doc/classes/TextServer.xml69
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 3e32afe370..e1c05165de 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -254,6 +254,13 @@
Returns source font size used to generate MSDF textures.
</description>
</method>
+ <method name="font_get_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font family name.
+ </description>
+ </method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
<argument index="0" name="font_rid" type="RID" />
@@ -300,6 +307,20 @@
Returns extra spacing added between glyphs in pixels.
</description>
</method>
+ <method name="font_get_style" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font style flags, see [enum FontStyle].
+ </description>
+ </method>
+ <method name="font_get_style_name" qualifiers="const">
+ <return type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font style name.
+ </description>
+ </method>
<method name="font_get_supported_chars" qualifiers="const">
<return type="String" />
<argument index="0" name="font_rid" type="RID" />
@@ -634,6 +655,14 @@
[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">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Sets the font family name.
+ </description>
+ </method>
<method name="font_set_oversampling">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -670,6 +699,22 @@
Sets extra spacing added between glyphs in pixels.
</description>
</method>
+ <method name="font_set_style">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="style" type="int" />
+ <description>
+ Sets the font style flags, see [enum FontStyle].
+ </description>
+ </method>
+ <method name="font_set_style_name">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Set the font style name.
+ </description>
+ </method>
<method name="font_set_texture_image">
<return type="void" />
<argument index="0" name="font_rid" type="RID" />
@@ -917,6 +962,13 @@
Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
</description>
</method>
+ <method name="shaped_text_get_custom_punctuation" qualifiers="const">
+ <return type="String" />
+ <argument 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="const">
<return type="float" />
<argument index="0" name="shaped" type="RID" />
@@ -1167,6 +1219,14 @@
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">
+ <return type="void" />
+ <argument index="0" name="shaped" type="RID" />
+ <argument 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">
<return type="void" />
<argument index="0" name="shaped" type="RID" />
@@ -1402,5 +1462,14 @@
<constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
Spacing at the bottom of the line.
</constant>
+ <constant name="FONT_BOLD" value="1" enum="FontStyle">
+ Font is bold.
+ </constant>
+ <constant name="FONT_ITALIC" value="2" enum="FontStyle">
+ Font is italic or oblique.
+ </constant>
+ <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle">
+ Font have fixed-width characters.
+ </constant>
</constants>
</class>