[Text Server] Restores bitmap font dynamic construction functions.

This commit is contained in:
bruvzg
2021-02-06 16:34:06 +02:00
parent 8fa92c70ea
commit bee718f1af
20 changed files with 415 additions and 142 deletions

View File

@ -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>