iOS, Android, Games, and Source Codes

FntBuilder with Processing

Posted: May 17th, 2013 | Author: | Filed under: Development | No Comments »

I got frustrated trying to find a free bitmap font builder on MacOS. On windows, I used BmFont over at angelcode.com.
So I made one myself using Processing.

https://github.com/icedman/fntbuilder

This is purely a developer’s tool. No GUI. Build the bitmap font through java code.

Screen Shot 2013-05-17 at 9.45.05 PM

Creating a font file is quick.

Builder builder = new Builder();
builder.init(256,256,"Marker Felt", 18);
//builder.init(128,128,"ufonts.com_maestro.ttf", 32);
//builder.init(128,128,"fayet_scripts.otf", 32);

builder.smooth = true;
builder.charPadding = 10;
builder.charSpacing = 2;
builder.textColor = color(255,0,0);

//builder.build("abcdefghijklmnopqrstuvwxyz1234567890!ABCDEFGHIJKLMNOPQRSTUVWXYZ");
builder.buildInMatch("[a-zA-Z0-9`~!@#$%^&*()_+-={}/[/];':\"<>]");
//builder.buildAllCharacters();

builder.saveFNT("myfont");

img = builder.renderAllPages(512,512,true);



Leave a Reply

You must be logged in to post a comment.