using bitmaps as text?

Blitz3D Forums/Blitz3D Beginners Area/using bitmaps as text?

i use...it works as the text command only it uses a bitmapped font. Use fontext to create em and improve in ur fav image editing prog.

example:
while not keyhit(1)
DrawFont%("Hey! Look @ Me"+Chr(13)+"Multiline!!!",20,20,FNT_MENU%,8)
flip
wend

Global FNT_MENU% = LoadAnimImage("gfx\fnt_main_b.png",8,8,0,64) : MaskImage FNT_MENU%,255,0,255

Function DrawFont%(TSTR$,XP%,YP%,FNTNAME%,HEIGHT%=0)
	StartX = XP%
	StartY = YP%
	FNTNAME% = FNTNAME%
	TextString$ = Upper(TSTR$)
	While Len(TextString$) > 0
		.Redo
		TextLength  = Len(TextString$)
		Tmp$ = Left(TextString$,1)
		If TextLength-1 < 0
			Exit
		EndIf
		TextString$ = Right(TextString$,TextLength-1)
		Frame = Asc(Tmp$)-33
		If Tmp$ = Chr(32)
			StartX = StartX + HEIGHT%
			Goto Redo
		ElseIf Tmp$ = Chr(13) Then
			StartY = StartY + HEIGHT%+2
			StartX = XP%
		Else
			DrawImage FNTNAME%,StartX,StartY,Frame
			StartX = StartX + HEIGHT%
		EndIf
	Wend
	Return True
End Function