Question about loading fonts.
BlitzMax Forums/BlitzMax Beginners Area/Question about loading fonts.
| ||
Hello, I've searched this forum on how to load fonts, and I still cant get them to work :( I'm using the following syntax: Global a_font:TImagefont=LoadImageFont("/images/fonts/myriad.ttf",20) SetImageFont a_font At runtime I get the error of: Unhandled Exception: Attempt to access field or method of Null object Anyone know what the problem may be? |
| ||
that first slash? Hmmm, no it's because you need to have a current graphics context (call graphics before SetImageFont), this needs to be fixed... |
| ||
Thanks! That did it! |
| ||
With the first slash in place, it will go to the images folder directly off the root directory of your current drive. Without the first slash, it will go to the images folder inside your current subdirectory. |