diff options
Diffstat (limited to 'doc/classes/TextServer.xml')
-rw-r--r-- | doc/classes/TextServer.xml | 142 |
1 files changed, 140 insertions, 2 deletions
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 9c34c63e2f..5635ec2be0 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -9,6 +9,19 @@ <tutorials> </tutorials> <methods> + <method name="create_font_bitmap"> + <return type="RID"> + </return> + <argument index="0" name="height" type="float"> + </argument> + <argument index="1" name="ascent" type="float"> + </argument> + <argument index="2" name="base_size" type="int"> + </argument> + <description> + Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method. + </description> + </method> <method name="create_font_memory"> <return type="RID"> </return> @@ -78,6 +91,51 @@ Draws box displaying character hexadecimal code. Used for replacing missing characters. </description> </method> + <method name="font_bitmap_add_char"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="char" type="int"> + </argument> + <argument index="2" name="texture_idx" type="int"> + </argument> + <argument index="3" name="rect" type="Rect2"> + </argument> + <argument index="4" name="align" type="Vector2"> + </argument> + <argument index="5" name="advance" type="float"> + </argument> + <description> + Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + </description> + </method> + <method name="font_bitmap_add_kerning_pair"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="A" type="int"> + </argument> + <argument index="2" name="B" type="int"> + </argument> + <argument index="3" name="kerning" type="int"> + </argument> + <description> + Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + </description> + </method> + <method name="font_bitmap_add_texture"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="texture" type="Texture"> + </argument> + <description> + Adds a texture to the bitmap font. + </description> + </method> <method name="font_draw_glyph" qualifiers="const"> <return type="Vector2"> </return> @@ -295,6 +353,24 @@ Returns list of script support overrides. </description> </method> + <method name="font_get_spacing_glyph" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Returns extra spacing for each glyphs in pixels. + </description> + </method> + <method name="font_get_spacing_space" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Sets extra spacing for each glyphs in pixels. + </description> + </method> <method name="font_get_supported_chars" qualifiers="const"> <return type="String"> </return> @@ -326,6 +402,27 @@ Returns underline thickness in pixels. </description> </method> + <method name="font_get_variation" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="tag" type="String"> + </argument> + <description> + Returns variation coordinate [code]tag[/code]. + </description> + </method> + <method name="font_get_variation_list" qualifiers="const"> + <return type="Dictionary"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. + Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + </description> + </method> <method name="font_has_char" qualifiers="const"> <return type="bool"> </return> @@ -469,6 +566,41 @@ Adds override for [method font_is_script_supported]. </description> </method> + <method name="font_set_spacing_glyph"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Returns extra spacing for the space character in pixels. + </description> + </method> + <method name="font_set_spacing_space"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Sets extra spacing for the space character in pixels. + </description> + </method> + <method name="font_set_variation"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="tag" type="String"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored. + </description> + </method> <method name="format_number" qualifiers="const"> <return type="String"> </return> @@ -621,7 +753,7 @@ <method name="shaped_text_clear"> <return type="void"> </return> - <argument index="0" name="arg0" type="RID"> + <argument index="0" name="rid" type="RID"> </argument> <description> Clears text buffer (removes text and inline objects). @@ -1133,6 +1265,9 @@ <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag"> Grapheme is kashida. </constant> + <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag"> + Grapheme is punctuation character. + </constant> <constant name="HINTING_NONE" value="0" enum="Hinting"> Disables font hinting (smoother but less crisp). </constant> @@ -1160,7 +1295,10 @@ <constant name="FEATURE_FONT_SYSTEM" value="32" enum="Feature"> TextServer supports loading system fonts. </constant> - <constant name="FEATURE_USE_SUPPORT_DATA" value="64" enum="Feature"> + <constant name="FEATURE_FONT_VARIABLE" value="64" enum="Feature"> + TextServer supports variable fonts. + </constant> + <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature"> TextServer require external data file for some features. </constant> </constants> |