minib3d + max2d - problem loading font
BlitzMax Forums/MiniB3D Module/minib3d + max2d - problem loading font
| ||
I can get DrawText working fine using Oddballs code here. But I can't get a different font to load using LoadImageFont/SetImageFont. I normally copy the font to my app folder and load it from there which works fine in other projects. Any ideas why it doesn't work? |
| ||
I found the problem, but I'm not sure how to fix it. I'm using Framework to load minib3d. If I use import I can load the font. I tried using Framework and then importing max2d but this didn't work either. I don't really understand why it doesn't throw an error or something. |
| ||
You need to import font modules too, like BRL.Freetypefont. Using Framework will only import BRL.Blitz. If you don't specify a Framework, all modules form BRL and PUB will get imported. |
| ||
Thanks for that. I mostly understand how modules/frameworks work, but I was just very surprised that an absent module didn't throw an error. Maybe it's particular to fonts. |
| ||
but I was just very surprised that an absent module didn't throw an error Some modules are setup to load with "factories". This allows a more pluggable framework, but of course you need to remember to import the specific modules from which you require that functionality. One other example is the need to import BRL.RamStream if you want to use IncBin. |