windows fonts

BlitzMax Forums/BlitzMax Beginners Area/windows fonts

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

How can I load in a standard windows font, like Arial, with LoadImageFont, and the set it with SetImageFont and draw it with DrawText. I don't seem to get it to work! Is that because it needs bitmap fonts not true type font. The docs call it an ImageFont, what the hell is that anyway? Also I guess if I load a windows font, it won't be cross platform as it won't exist on the Mac. So in that case, where can I get some image fonts for use with Max? Thanks in advance.

That'll be a bitmap font module that you would need (anyone getting sick of this yet).

I wrote my own bitmap font code a while ago. So, if I can't use windows fonts, does anyone have some nice, royalty free for commercial use, bitmap fonts kicking around that they could share?

thanks

This works but I have the verdana font in the same directory as the program...
Graphics 640,480
myfont:TImageFont=LoadImageFont("Verdana.ttf",12)
SetImageFont myfont
DrawText "HELLO WORLD", 100,100
Flip
WaitKey()

What code are you using that doesn't work?

I was just being dumb, thanks TonyG.