Move BMFont parser code from importer to the FontData to allow loading bitmap fonts in the runtime (without importing).

This commit is contained in:
bruvzg 2021-11-09 10:41:45 +02:00
parent 9444a3f01d
commit 294e48ae58
4 changed files with 787 additions and 739 deletions

View file

@ -372,6 +372,22 @@
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
<method name="load_bitmap_font">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code].
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
</description>
</method>
<method name="load_dynamic_font">
<return type="int" enum="Error" />
<argument index="0" name="path" type="String" />
<description>
Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code].
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
</description>
</method>
<method name="remove_cache">
<return type="void" />
<argument index="0" name="cache_index" type="int" />