Fonts not working in BlitzMax
Archives Forums/Linux Discussion/Fonts not working in BlitzMax
| ||
Greetings! I've been using BlitzMax in Windows environments and am now tying to migrate a project into Linux and in the future OSX, but I'll cross that path later! :-D The program works great, but the fonts revert back to the default BlitzMax font. The rest of the graphics and audio run fine, but this elusive font problem is driving me crazy! I've been installing all sorts of freetype libraries, but nothing seems to work. Quick run-down on the system: - Ubuntu 9.04 32-bit version (Ya, I've been slacking on getting 9.10 :-D ) - Using a ttf as the source font like so. Global MainFont:TImageFont = LoadImageFont("graphics\fontie.ttf", 36, SMOOTHFONT) - I also use this for graphics. SetGraphicsDriver GLMax2DDriver() Any suggestions would be greatly appreciated it! Mr.Wolf |
| ||
Try a full path to the font. |
| ||
Brucey, Tried it to no avail--good suggestion though. :-D Is there a certain ttf library it uses? Thanks for your help! Mr.Wolf |
| ||
Also check file/dir case - since Windows is not case sensitive, and Linux/Mac is. Is there a certain ttf library it uses? It uses a built-in freetype module - "Pub.Freetype", which usually works fine. Although it is a bit old now, it should work for 99% of font files (but there are some potential issues on Mac with this version and certain fonts). You also have the option of sticking a DebugStop before the call to LoadImageFont() and step into the code and see if it doesn't go where you think it should - That can sometimes show up issues in your own code (i.e. incorrect folders, etc). |
| ||
Cool! Thanks for the tid-bits! I'll check it out later and let you know how it turns out! Unfortunately, I don't have the computer right now, so I can't test it out. I've also made sure of the case is proper. Thanks for your help! Mr.Wolf |
| ||
***UPDATE!*** I decided that it might be better for me to start from scratch, so I formatted my Linux partition and installed Ubuntu 9.10. I installed the packages that were listed in the 9.04 and 9.10, but the font still didn't work properly. I renamed it, but nothing. Full permissions. Nada. A different font. Nope. This is quite odd. Oh well, thank you all for helping out. I'm still going to try and work on it. I've been trying on getting it to work on an old laptop I had laying around, but I'm thinking about installing it on a different computer. Thanks again. Mr.Wolf |
| ||
UPDATE!!! I have been in the process of moving, so I haven't had Internet! :-D Anywho, I tried what Brucey mentioned a little while ago, about using the full path again and for some odd reason, this time it worked! I am not questioning why it decided to work suddenly, but I'll take it! I also tried a short name and it worked fine too. Seriously, I am not sure what was going on. The only other thing I did since then was reload Ubuntu... I've got nothing. Thanks again for your help! Mr.Wolf |