2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name= "DynamicFont" inherits= "Font" category= "Core" version= "3.0.alpha.custom_build" >
<brief_description >
2017-10-11 06:08:59 +08:00
DynamicFont renders vector font files at runtime.
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2017-10-11 06:08:59 +08:00
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.
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<demos >
</demos>
<methods >
<method name= "add_fallback" >
<return type= "void" >
</return>
<argument index= "0" name= "data" type= "DynamicFontData" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Adds a fallback font.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_fallback" qualifiers= "const" >
<return type= "DynamicFontData" >
</return>
<argument index= "0" name= "idx" type= "int" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Returns the fallback font at index [code]idx[/code].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_fallback_count" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2017-10-11 06:08:59 +08:00
Returns the number of fallback fonts.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_font_data" qualifiers= "const" >
<return type= "DynamicFontData" >
</return>
<description >
</description>
</method>
<method name= "get_size" qualifiers= "const" >
<return type= "int" >
</return>
<description >
2017-10-11 06:08:59 +08:00
Returns the font size in pixels.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_spacing" qualifiers= "const" >
<return type= "int" >
</return>
<argument index= "0" name= "type" type= "int" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Returns the given type of spacing in pixels. See [code]SPACING_*[/code] constants.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_use_filter" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2017-10-11 06:08:59 +08:00
Returns [code]true[/code] if filtering is used.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_use_mipmaps" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2017-10-11 06:08:59 +08:00
Returns [code]true[/code] if mipmapping is used.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "remove_fallback" >
<return type= "void" >
</return>
<argument index= "0" name= "idx" type= "int" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Removes the fallback font at index [code]idx[/code].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "set_fallback" >
<return type= "void" >
</return>
<argument index= "0" name= "idx" type= "int" >
</argument>
<argument index= "1" name= "data" type= "DynamicFontData" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Sets the fallback font at index [code]idx[/code].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "set_font_data" >
<return type= "void" >
</return>
<argument index= "0" name= "data" type= "DynamicFontData" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Sets the [DynamicFontData].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "set_size" >
<return type= "void" >
</return>
<argument index= "0" name= "data" type= "int" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Sets the font size.
2017-09-13 04:42:36 +08:00
</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 >
2017-10-11 06:08:59 +08:00
Sets the spacing of the given type. See [code]SPACING_*[/code] constants.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "set_use_filter" >
<return type= "void" >
</return>
<argument index= "0" name= "enable" type= "bool" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Set to [code]true[/code] to use filtering.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "set_use_mipmaps" >
<return type= "void" >
</return>
<argument index= "0" name= "enable" type= "bool" >
</argument>
<description >
2017-10-11 06:08:59 +08:00
Set to [code]true[/code] to use mipmapping.
2017-09-13 04:42:36 +08:00
</description>
</method>
</methods>
<members >
2017-09-13 14:49:40 +08:00
<member name= "extra_spacing_bottom" type= "int" setter= "set_spacing" getter= "get_spacing" >
2017-10-11 06:08:59 +08:00
Extra spacing at the bottom in pixels.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "extra_spacing_char" type= "int" setter= "set_spacing" getter= "get_spacing" >
2017-10-11 06:08:59 +08:00
Extra character spacing in pixels.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "extra_spacing_space" type= "int" setter= "set_spacing" getter= "get_spacing" >
2017-10-11 06:08:59 +08:00
Extra space spacing in pixels.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "extra_spacing_top" type= "int" setter= "set_spacing" getter= "get_spacing" >
2017-10-11 06:08:59 +08:00
Extra spacing at the top in pixels.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "font_data" type= "DynamicFontData" setter= "set_font_data" getter= "get_font_data" >
2017-10-11 06:08:59 +08:00
The font data.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "size" type= "int" setter= "set_size" getter= "get_size" >
2017-10-11 06:08:59 +08:00
The font size.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "use_filter" type= "bool" setter= "set_use_filter" getter= "get_use_filter" >
2017-10-11 06:08:59 +08:00
If [code]true[/code] filtering is used.
2017-09-13 04:42:36 +08:00
</member>
2017-09-13 14:49:40 +08:00
<member name= "use_mipmaps" type= "bool" setter= "set_use_mipmaps" getter= "get_use_mipmaps" >
2017-10-11 06:08:59 +08:00
If [code]true[/code] mipmapping is used.
2017-09-13 04:42:36 +08:00
</member>
</members>
<constants >
<constant name= "SPACING_TOP" value= "0" >
2017-10-11 06:08:59 +08:00
Spacing at the top.
2017-09-13 04:42:36 +08:00
</constant>
<constant name= "SPACING_BOTTOM" value= "1" >
2017-10-11 06:08:59 +08:00
Spacing at the bottom.
2017-09-13 04:42:36 +08:00
</constant>
<constant name= "SPACING_CHAR" value= "2" >
2017-10-11 06:08:59 +08:00
Character spacing.
2017-09-13 04:42:36 +08:00
</constant>
<constant name= "SPACING_SPACE" value= "3" >
2017-10-11 06:08:59 +08:00
Space spacing.
2017-09-13 04:42:36 +08:00
</constant>
</constants>
</class>