TBitmapFont - Free Bitmap Font Engine

BlitzMax Forums/BlitzMax Programming/TBitmapFont - Free Bitmap Font Engine

Hi,

I have created a small BitmapFontEditor and some easy to use BitmapFont classes for Blitzmax.

Here is a screenshot of the editor/converter:



You can download and use it for free here:

http://www.intermediaware.com/index.php?id=295

It's very easy to use, here is some example source:

SuperStrict

Import "BitmapFont.bmx"

Graphics(800,600,0,60)

SetBlend (ALPHABLEND)

Local MyFont:TBitmapFont = New TBitmapFont
MyFont.Load("fonts/micross_30.fnt")

While (Not KeyDown(KEY_ESCAPE))
	Cls
	MyFont.Draw("Hello World!",MouseX(),MouseY(), True)
	Flip
Wend

End


Hey thanks Maverick. I may end up using this.

This is very cool. Thanks for sharing :)

Thanks for this, BTW you should call it TPNGFont :P

EDIT: I've found that if you want to change the font size manually you have to click the italic or bold check buttons to update the canvas, so I added a button to update it, just thought I'd share..

NOTE:This is a modification of BitmapFont_Creator.bmx.

At line 78 Char 42, add:
, btnupdate:TGadget


At line 92 Char 3, add:
btnupdate = CreateButton("Update",530,267,55,21,MainWindow)


At line 122 Char 23, add:
Case btnupdate
	If i>-1
		fileName=fontPath+GadgetItemText(lstFontNames,i)
		iFont=LoadImageFont(fileName,TextFieldText(tbFontSize).ToInt(),style)FontWindow.OffsetY = 0
		SetSliderValue(FontWindow.SliderV,0)
		RedrawGadget(FontWindow.Canavas)
	EndIf



I've found that if you want to change the font size manually you have to click the italic or bold check buttons to update the canvas, so I added a button to update it, just thought I'd share..


If you double click the font size it should update automatically.

If you double click the font size it should update automatically.


Not if I am manually typing in the font size in the textfield..

Thank you very much!

Hey, this is nice. :-)

@Plash:
Okay, you're right. I will fix this bug as soon as I'm back from my hollidays in one week :-)

Ow! Can someone compile the font creator for those of us without MaxGUI?

I will update the archive with the executable as soon as I am back at home. Im currently in hollidays :-)

Top banana! Bump the thread when you do please.

Siedge: If u need an exe so badly, gimme an email and I'll send it to you.