When working with external localization or customization where the user can use their own font in runtime. Loading font with font_add will freeze the program depending on the size of the font file. E.g. Chinese font with ten-thousands of glyphs can take seconds to load, thus reducing the responsiveness of the program.
Describe the solution you'd like
Add asynchronous font_add function, where font loading can be done in other threads while the program is running. With this, you can start the program with some dummy font while waiting for the async return.
Describe alternatives you've considered
Cache loaded font texture (surface_save) and load back (sprite_add > font_add_sprite). This method is slower than font_add
Provided the fonts for all supported languages in the executable. This method will remove the customization aspect and will increase the exe file size since each language also needs multiple fonts for different sizes.
Is your feature request related to a problem?
When working with external localization or customization where the user can use their own font in runtime. Loading font with
font_add
will freeze the program depending on the size of the font file. E.g. Chinese font with ten-thousands of glyphs can take seconds to load, thus reducing the responsiveness of the program.Describe the solution you'd like
Add asynchronous
font_add
function, where font loading can be done in other threads while the program is running. With this, you can start the program with some dummy font while waiting for the async return.Describe alternatives you've considered
font_add
Additional context
No response