[DOCS] DynamicFont

This commit is contained in:
Dio 2017-10-11 00:08:59 +02:00 committed by Dio
parent 51b41dcdbb
commit f43e49b1c0

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="DynamicFont" inherits="Font" category="Core" version="3.0.alpha.custom_build"> <class name="DynamicFont" inherits="Font" category="Core" version="3.0.alpha.custom_build">
<brief_description> <brief_description>
DynamicFont renders vector font files at runtime.
</brief_description> </brief_description>
<description> <description>
DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]\ s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -15,6 +17,7 @@
<argument index="0" name="data" type="DynamicFontData"> <argument index="0" name="data" type="DynamicFontData">
</argument> </argument>
<description> <description>
Adds a fallback font.
</description> </description>
</method> </method>
<method name="get_fallback" qualifiers="const"> <method name="get_fallback" qualifiers="const">
@ -23,12 +26,14 @@
<argument index="0" name="idx" type="int"> <argument index="0" name="idx" type="int">
</argument> </argument>
<description> <description>
Returns the fallback font at index [code]idx[/code].
</description> </description>
</method> </method>
<method name="get_fallback_count" qualifiers="const"> <method name="get_fallback_count" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the number of fallback fonts.
</description> </description>
</method> </method>
<method name="get_font_data" qualifiers="const"> <method name="get_font_data" qualifiers="const">
@ -41,6 +46,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the font size in pixels.
</description> </description>
</method> </method>
<method name="get_spacing" qualifiers="const"> <method name="get_spacing" qualifiers="const">
@ -49,18 +55,21 @@
<argument index="0" name="type" type="int"> <argument index="0" name="type" type="int">
</argument> </argument>
<description> <description>
Returns the given type of spacing in pixels. See [code]SPACING_*[/code] constants.
</description> </description>
</method> </method>
<method name="get_use_filter" qualifiers="const"> <method name="get_use_filter" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if filtering is used.
</description> </description>
</method> </method>
<method name="get_use_mipmaps" qualifiers="const"> <method name="get_use_mipmaps" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if mipmapping is used.
</description> </description>
</method> </method>
<method name="remove_fallback"> <method name="remove_fallback">
@ -69,6 +78,7 @@
<argument index="0" name="idx" type="int"> <argument index="0" name="idx" type="int">
</argument> </argument>
<description> <description>
Removes the fallback font at index [code]idx[/code].
</description> </description>
</method> </method>
<method name="set_fallback"> <method name="set_fallback">
@ -79,6 +89,7 @@
<argument index="1" name="data" type="DynamicFontData"> <argument index="1" name="data" type="DynamicFontData">
</argument> </argument>
<description> <description>
Sets the fallback font at index [code]idx[/code].
</description> </description>
</method> </method>
<method name="set_font_data"> <method name="set_font_data">
@ -87,6 +98,7 @@
<argument index="0" name="data" type="DynamicFontData"> <argument index="0" name="data" type="DynamicFontData">
</argument> </argument>
<description> <description>
Sets the [DynamicFontData].
</description> </description>
</method> </method>
<method name="set_size"> <method name="set_size">
@ -95,6 +107,7 @@
<argument index="0" name="data" type="int"> <argument index="0" name="data" type="int">
</argument> </argument>
<description> <description>
Sets the font size.
</description> </description>
</method> </method>
<method name="set_spacing"> <method name="set_spacing">
@ -105,6 +118,7 @@
<argument index="1" name="value" type="int"> <argument index="1" name="value" type="int">
</argument> </argument>
<description> <description>
Sets the spacing of the given type. See [code]SPACING_*[/code] constants.
</description> </description>
</method> </method>
<method name="set_use_filter"> <method name="set_use_filter">
@ -113,6 +127,7 @@
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set to [code]true[/code] to use filtering.
</description> </description>
</method> </method>
<method name="set_use_mipmaps"> <method name="set_use_mipmaps">
@ -121,35 +136,48 @@
<argument index="0" name="enable" type="bool"> <argument index="0" name="enable" type="bool">
</argument> </argument>
<description> <description>
Set to [code]true[/code] to use mipmapping.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing"> <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing">
Extra spacing at the bottom in pixels.
</member> </member>
<member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing"> <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing">
Extra character spacing in pixels.
</member> </member>
<member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing"> <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing">
Extra space spacing in pixels.
</member> </member>
<member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing"> <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing">
Extra spacing at the top in pixels.
</member> </member>
<member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data"> <member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data">
The font data.
</member> </member>
<member name="size" type="int" setter="set_size" getter="get_size"> <member name="size" type="int" setter="set_size" getter="get_size">
The font size.
</member> </member>
<member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter"> <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter">
If [code]true[/code] filtering is used.
</member> </member>
<member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps"> <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps">
If [code]true[/code] mipmapping is used.
</member> </member>
</members> </members>
<constants> <constants>
<constant name="SPACING_TOP" value="0"> <constant name="SPACING_TOP" value="0">
Spacing at the top.
</constant> </constant>
<constant name="SPACING_BOTTOM" value="1"> <constant name="SPACING_BOTTOM" value="1">
Spacing at the bottom.
</constant> </constant>
<constant name="SPACING_CHAR" value="2"> <constant name="SPACING_CHAR" value="2">
Character spacing.
</constant> </constant>
<constant name="SPACING_SPACE" value="3"> <constant name="SPACING_SPACE" value="3">
Space spacing.
</constant> </constant>
</constants> </constants>
</class> </class>