Expose get_char_size() from Font instead of BitmapFont

`get_char_size()` is a public virtual function defined in the `Font`
class. Implementations exist for both `BitmapFont` and `Dynamic Font`.
However, it was only exposed to the GDScript API through the Bitmap
Font, and not for Dynamic Font.

This commit exposes the function through `Font` instead.

Fixes #23967
This commit is contained in:
Maganty Rushyendra
2020-05-27 17:21:35 +08:00
parent 84d9e10f88
commit a4413710f9
3 changed files with 12 additions and 13 deletions

View File

@ -54,6 +54,17 @@
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
<method name="get_char_size" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="char" type="int">
</argument>
<argument index="1" name="next" type="int" default="0">
</argument>
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
</description>
</method>
<method name="get_descent" qualifiers="const">
<return type="float">
</return>