Progress update #2 and the problem with fonts


Solar2D has this quirk where fonts cannot be loaded from anywhere other than “system.ResourceDirectory”. Of all the resources Solar2D works with, only fonts have this limitation.

Text objects, which are the only ones left so far of the first basic 8 objects dahlia can create, cannot be properly implemented with this limitation in place. As I can’t understand the font-loading and text-rendering sections of Solar2D source code (or most of the source code for that matter), I’ve had to come up with a custom text-rendering solution that allows me to use truetype fonts from anywhere, including memory.

I initially thought this would be quite easy to accomplish, but got proven wrong pretty quickly, and had to write a C++ plugin to get it to work. This has an upside however, as it allows dahlia to support basic text styling such as bold, italic, underlined, struck-through and multi-colour text, which have been on the Solar2D wishlist for a long while.

Text objects will also include hassle-free support for bitmap fonts in the AngelCode format, thanks to the ponyfont library made by ponywolf.

P/s: If you haven’t already tried the free demo, go ahead and give it a spin. I’d also appreciate any comments and feedback you may have.

Get Dahlia Studio

Buy Now$29.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.