diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/FontData.xml | 7 | ||||
-rw-r--r-- | doc/classes/TextServer.xml | 31 | ||||
-rw-r--r-- | doc/classes/TextServerExtension.xml | 31 |
3 files changed, 69 insertions, 0 deletions
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index ccaefc60ee..9344a1fe80 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -567,6 +567,9 @@ <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()"> Contents of the dynamic font source file. </member> + <member name="embolden" type="float" setter="set_embolden" getter="get_embolden" default="0.0"> + If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + </member> <member name="fixed_size" type="int" setter="set_fixed_size" getter="get_fixed_size" default="0"> Font size, used only for the bitmap fonts. </member> @@ -603,5 +606,9 @@ <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1"> Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. </member> + <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)"> + 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]. + </member> </members> </class> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 3157eea436..020c30b9cd 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -112,6 +112,13 @@ Returns the font descent (number of pixels below the baseline). </description> </method> + <method name="font_get_embolden" qualifiers="const"> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns font embolden strength. + </description> + </method> <method name="font_get_fixed_size" qualifiers="const"> <return type="int" /> <argument index="0" name="font_rid" type="RID" /> @@ -368,6 +375,13 @@ 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="const"> + <return type="Transform2D" /> + <argument 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="const"> <return type="float" /> <argument index="0" name="font_rid" type="RID" /> @@ -542,6 +556,14 @@ Sets the font descent (number of pixels below the baseline). </description> </method> + <method name="font_set_embolden"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="strength" type="float" /> + <description> + Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + </description> + </method> <method name="font_set_fixed_size"> <return type="void" /> <argument index="0" name="font_rid" type="RID" /> @@ -765,6 +787,15 @@ 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"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument 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"> <return type="void" /> <argument index="0" name="font_rid" type="RID" /> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index f730f28e79..5ffd80bf63 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -112,6 +112,13 @@ Returns the font descent (number of pixels below the baseline). </description> </method> + <method name="_font_get_embolden" qualifiers="virtual const"> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns font embolden strength. + </description> + </method> <method name="_font_get_fixed_size" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="font_rid" type="RID" /> @@ -368,6 +375,13 @@ 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"> + <return type="Transform2D" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Retruns 2D transform applied to the font outlines. + </description> + </method> <method name="_font_get_underline_position" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="font_rid" type="RID" /> @@ -551,6 +565,14 @@ 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_embolden" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="strength" type="float" /> + <description> + Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + </description> + </method> <method name="_font_set_fixed_size" qualifiers="virtual"> <return type="void" /> <argument index="0" name="font_rid" type="RID" /> @@ -773,6 +795,15 @@ 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"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument 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"> <return type="void" /> <argument index="0" name="font_rid" type="RID" /> |