Font-setting problem...
Blitz3D Forums/Blitz3D Beginners Area/Font-setting problem...
| ||
Hi. I set any font, and the font it shows is always the same. I don't know why, could somebody tell me? i do this at the beginning of the program:font = loadfont("fontname.ttf",23,false,false,false) setfont font |
| ||
Dont put the extension .ttf try font = loadfont("Arial",23) setfont font |
| ||
Didnt work |
| ||
Please, i dont know how to do this!!!! HELP! |
| ||
You probably need to set a graphics mode before loading a font. |
| ||
Some fonts cannot be loaded. You'll need to check if the variable font returns a valid handle (non-zero) or not.font = loadfont("fontname.ttf",23,false,false,false) print font if font <> 0 then setfont font If it doesn't load, 'font' will be zero, and most likely, the font is not compatible. In that case, use JuicyFonts to convert the font to a bitmap font. http://juicyfonts.mysite.wanadoo-members.co.uk/ |
| ||
I did set graphics, thats a code snippet of what i do juicyfonts doesnt work, x,and y coord are messed up |
| ||
Well, juicyfonts seems to have a dialog that allows adjusting that: link You might be able to fix it with that. |
| ||
Erm... Its just a screenshot link? There is no link for instructions on that... so... do I change the kerning?(thats all I can gather from the screenshot......) |
| ||
Well, juicyfonts or not, if the font doesn't want to load with LoadFont, then basically you'll need a bitmap with all the characters in a matrix that you can load using LoadAnimImage. You could even make one in paint, if nothing else works. |
| ||
The best way is to go into the windows font folder, and check the EXACT spelling and case of the letters. Can you show us the exact code you are using. The code after it as well, just incase something else is happening. |
| ||
Err...Its rally pong, so no. But it doesnt do it just for that prog,ALL progs. Example: font = loadfont("fontname.ttf") setfont font text 0,0,"This is a test" |
| ||
Global font = LoadFont("Arial black") SetFont font Text 0,0,"HELLO" WaitKey() Try running that on it's own. Make sure you have the latest blitz (1.99) |
| ||
Never mind, it has to be the exact name it is in windows. I didnt think of that. Thanks Ross C and everybody. :) (Could a mod close this? Problem fixed.) |