Corona – bitmap font with graphics 2.0

bmGlyph 2.0.3 is now producing lua font file definition in order to use the graphics 2.0 engine (and without the v1 compatibility mode / sprite.lua file). The bmf2.lua is also support unicode chars!

bmglyph corona 2.0

I modified the known bmf.lua class, and created a bmf2.lua which is able to load the font, here is how to use it:

require(‘bmf2′)

local myfont = bmf2.loadFont( ‘bmGlyphArial’ )

local string = bmf2.newString(myfont, “bmGlyph and Corona\ngraphics 2.0\nunicode support\nйцу\néçàà”)

string.x=50

string.y=50

bmf2 is supporting unicode chars, i’ve also modified a utf8.lua lib in order to do that … so basically, you would only need to import the bmf2.lua and bmf_utf8.lua files in your project.

here is the project demo: bmGlyph Corona 2.0.zip