Loading fonts
BlitzMax Forums/BlitzMax Beginners Area/Loading fonts
| ||
How do I load a font like Arial or something into my blitzmax program? It's alot more complicated that Blitz3D or BlitzPlus. |
| ||
How do I load a font like Arial or something into my blitzmax program? It's alot more complicated that Blitz3D or BlitzPlus. No its not.LoadImageFont() SetImageFont() |
| ||
Be warned that DrawText is pretty slow though, you may want to think about using Bitmap fonts instead... |
| ||
I tried that and both Bitmap fonts and regular *.ttf and *.fon kind of fonts dont write correctly at all |
| ||
You need a relative or absolute path to the font you are loading.Graphics 320,240, 0 DrawText "Internal Default", 50,40 SetImageFont LoadImageFont( "C:\WINDOWS\Fonts\arial.ttf", 50) DrawText "Arial 50", 50,60 SetImageFont LoadImageFont( "C:\WINDOWS\Fonts\impact.ttf", 50) DrawText "Impact 50", 50,120 Flip WaitKeyThat little snippet should look like this on windows If it doesnt, there could be some graphics/driver problem... |