ponyfont--Modern Bitmap Font Support for Corona SDK

Hi all! I’m using this thread to announce ponyfont a modern bitmap font module for Corona SDK.

https://github.com/ponywolf/ponyfont

There are many partial attempts on this forum (and on GitHub, BitBucket, etc.) to build a BMF importer, but most rely on deprecated functionality and require additional code to integrate. The goal of ponyfont is to have a replacement for display.newText() with similar arguments and rendering.

Of course the benefit is direct control over glyph in a display group, which makes doing text animation a breeze… So this…

-- Demo looping through each letter for i = 1, bmpText.numChildren do   transition.from ( bmpText[i], { delay = 1000 + (i\*25), time = 250, xScale = 2, yScale = 2, alpha = 0, transition = easing.outBounce }) end

…gets you this…

ponyfont-gif-preview.gif

Looks sweet!  Can’t wait to give it a whirl.

I edited the main post with the download link. :slight_smile:

Also, I found a cool little web app for making FNT/PNG combos… http://kvazars.com/littera/

Cool!  You did an Ed.  I often post and notice I forgot a link. :slight_smile:

-Ed

+1 to Littera for anyone looking to make bitmap fonts. Far superior and more user-friendly than AngelCode.

You should consider making this a plugin!

@Rob,

For sure. Pure lua plugins look simple enough. I wanted to stick this in a project (maybe the ludum dare later this month…) to see how it does in a real game before adding it to the marketplace.

But for sure, this is a start on turning my internal stuff into plugins. 

@no2games Thank you for sharing this amazing bitmap font library! I have been hobbling along with something I hacked together based on old code from the web. Your code is very clean and modern. Thank you!

There does seem to be one problem with the code though. Everything I have tried works great except for the alignment code. Using align “left” is fine, but using “center” or “right” is just wonky. I can’t seem to resolve the issue myself but it’s definitely a problem with the justify() method. I am sure it’s more than just this one thing, but one thing I noticed is that the justify() code disregards the anchor logic. To reproduce the error, just change the align properties in your sample code to either “center” or “right”.

I will have a look…

Looks sweet!  Can’t wait to give it a whirl.

I edited the main post with the download link. :slight_smile:

Also, I found a cool little web app for making FNT/PNG combos… http://kvazars.com/littera/

Cool!  You did an Ed.  I often post and notice I forgot a link. :slight_smile:

-Ed

+1 to Littera for anyone looking to make bitmap fonts. Far superior and more user-friendly than AngelCode.

You should consider making this a plugin!

@Rob,

For sure. Pure lua plugins look simple enough. I wanted to stick this in a project (maybe the ludum dare later this month…) to see how it does in a real game before adding it to the marketplace.

But for sure, this is a start on turning my internal stuff into plugins. 

@no2games Thank you for sharing this amazing bitmap font library! I have been hobbling along with something I hacked together based on old code from the web. Your code is very clean and modern. Thank you!

There does seem to be one problem with the code though. Everything I have tried works great except for the alignment code. Using align “left” is fine, but using “center” or “right” is just wonky. I can’t seem to resolve the issue myself but it’s definitely a problem with the justify() method. I am sure it’s more than just this one thing, but one thing I noticed is that the justify() code disregards the anchor logic. To reproduce the error, just change the align properties in your sample code to either “center” or “right”.

I will have a look…