lil sample code by moi... If your gonna work on demo's n stuff plz use ur own fonts...And not the one below...IT'S MINE all MINE!
Graphics 320,110,32,2
SetBuffer BackBuffer()
Global FNTHEIGHT% = 8
Global FNTNAME% = LoadAnimImage("fnt_64x64W.png",8,FNTHEIGHT%,0,64):MaskImage(FNTNAME%,255,0,255)
While Not KeyHit(1)
DrawFnt(20,20,"Hello World!"+Chr(13)+"Hey this is cool..."+Chr(13)+Chr(13)+"The font was made with FonText.")
DrawFnt(20,45,Chr(13)+Chr(13)+Chr(13)+Chr(13)+"Created by darklordz")
Flip
Wend
End
;Draw BMFonts
Function DrawFnt(Start_X,Start_Y,TextString$)
StartX = Start_X
StartY = Start_Y
TextString$ = Upper(TextString$)
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) ; SPACE
StartX = StartX + FNTHEIGHT%
Goto Redo
ElseIf Tmp$ = Chr(13) Then ; LINEBREAK
StartY = StartY + FNTHEIGHT%
StartX = Start_X
Else
DrawImage FNTNAME,StartX,StartY,Frame
StartX = StartX + FNTHEIGHT%
EndIf
Wend
End Function
use this image with the demo :
|