How to draw good quality text?

BlitzMax Forums/BlitzMax Programming/How to draw good quality text?

What's the internal name of the font you're trying to load (which you see by double-clicking the .TTF file)? For example, if it's "Century Schoolbook" then you'll need to rename the font file to "Century Schoolbook.ttf"

Also, are you sure that the font is being loaded? You could try adding:
If Font_Head1 = Null Then Notify "Font Not Loaded"
after the LoadImageFont line. If Blitz can't load a font, it doesn't give an error, it just uses a fixed-size default font. Here's what I get when the font isn't named properly and the default is used:



And here's what I get when it's named correctly:



However, it looks a little thin due to being shrunk to half size with SetScale (it gets averaged with the surrounding black which makes the strokes thin). Using it at size 21 and not scaling it down looks better:



As for bold, I think that the BOLDFONT flag just tries to fake bold by thickening the strokes; at least I think that's what Blitz3D does - I don't use the flag myself. If you have an actual bold version of the font as a TTF, you can name it properly and load that file (i.e. "Century Schoolbook Bold.ttf" if that's what the internal name is) and it'll look properly bold:



As for fonts that are legal to use freely, the Bitstream Vera family can be redistributed with personal or commercial products, as long as the fonts aren't sold alone. The Arkpandora fonts are good substitutes for Arial, Times, and Verdana that can be redistributed freely, but not sold alone, like Vera (you can extract them from the .tgz file for use in Windows). Both Vera and Arkpandora include some code (monospace) fonts. Ray Larabie's fonts (some are rather bizarre, but others are very good) are also free. All three groups can be redistributed as long as you include the copyright notice/license that they come with, and they can be left in unpacked .TTF form if you like so that the player/user can use them.

It might be acceptable to redistribute other fonts (that you legally own) as long as they're Incbin-ed, Moleboxed, or otherwise unusable directly by the player/user, but it'd be safer to stick with fonts that allow redistribution if you can. If you're really interested, you can see examples of how font companies protect their products here.