Ever seen how much a program slows down when too many text commands are used? Want the easy way round? Instead of drawing each letter manually over hours, you can use this little code snippet. It will create a folder called 'Font' in the same directory, and copy all 224 ascii characters named their number. eg, " " = "32.bmp". And to top that off, i added a function to use them in:
code to make the fonts. A seperate program altogether:
set display mode 1024,768,32
set text to bold
ink rgb(5,5,5),rgb(0,0,0)
make directory "Font"
set text size 22
set text font "Sylfaen"
for letter=32 to 255
text 0,0,chr$(letter)
get image 1,0,0,22,22
save image "Font/"+str$(letter)+".bmp",1
cls
next letter
code to load the fonts into ur program. Make a directory called 'Font' in the folder with your .dba file. Put this at the start of your program:
for loadfont=32 to 255
load image "Font/"+str$(loadfont)+".bmp",loadfont
next loadfont
function. Put this at the end of your program:
function paste_text(string$,x,y)
chars=len(string$)
rem in ascii, a=65,b=66,c=67, and so on...
for texting=1 to chars
currchar=asc(mid$(string$,texting))
if currchar<>32
paste image currchar,x+(texting*12),y,1
endif
next texting
endfunction
i hope this is helpful to someone
.........what's the point of reading this?