diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-15 11:10:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 11:10:42 +0100 |
commit | d8691e8ce28fd6899a20bdf76623ee1471862bab (patch) | |
tree | fe968dab5b461a24f61f1a0f2c6f98b42b16db93 /doc/classes | |
parent | fa06d3cf6303506e8d65fe23f9f3c71e49960b88 (diff) | |
parent | f4d095cdd3d04b3215d42928e6b7ac412d78c4c5 (diff) |
Merge pull request #46043 from bruvzg/restore_char_and_space_extra_spacing
[TextServer] Restore character and space extra spacing support.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Font.xml | 4 | ||||
-rw-r--r-- | doc/classes/FontData.xml | 34 | ||||
-rw-r--r-- | doc/classes/TextServer.xml | 40 |
3 files changed, 76 insertions, 2 deletions
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index edd2bd137f..409e405551 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -329,10 +329,10 @@ </methods> <members> <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing at the bottom in pixels. + Extra spacing at the bottom of the line in pixels. </member> <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra character spacing in pixels. + Extra spacing at the top of the line in pixels. </member> </members> <constants> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index e2c35f9ce7..7e99510124 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -154,6 +154,15 @@ Returns list of script support overrides. </description> </method> + <method name="get_spacing" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="type" type="int"> + </argument> + <description> + Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + </description> + </method> <method name="get_supported_chars" qualifiers="const"> <return type="String"> </return> @@ -296,6 +305,17 @@ Adds override for [method is_script_supported]. </description> </method> + <method name="set_spacing"> + <return type="void"> + </return> + <argument index="0" name="type" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + </description> + </method> <method name="set_variation"> <return type="void"> </return> @@ -318,6 +338,14 @@ <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false"> If [code]true[/code], distance field hint is enabled. </member> + <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0"> + Extra spacing for each glyphs in pixels. + This can be a negative number to make the distance between glyphs smaller. + </member> + <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> + Extra spacing for the space character in pixels. + This can be a negative number to make the distance between words smaller. + </member> <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false"> If [code]true[/code], default autohinter is used for font hinting. </member> @@ -326,5 +354,11 @@ </member> </members> <constants> + <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> + Spacing for each glyph. + </constant> + <constant name="SPACING_SPACE" value="1" enum="SpacingType"> + Spacing for the space character. + </constant> </constants> </class> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 791646000b..413a77a0e9 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -295,6 +295,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> @@ -490,6 +508,28 @@ 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> |