Howdy,
How do I get a larger text size and different fonts? I don't like the default font in allegro, so how do I load and/or make new fonts for allegro that I can use? And how do I make a font bigger?
I had such a Q too.. what i didn't get there is how to modify the sizes.. or it must be a lrage font itself? :S
It must be a large font itself. I have considered making something to handle scaling, though I don't know how well it would work...
So how do I make a .fnt file?
How do I get a larger text size and different fonts? I don't like the default font in allegro, so how do I load and/or make new fonts for allegro that I can use? And how do I make a font bigger?
Allegro is not a font library. If you want to manipulate fonts use a font library.
Wait a minute...... I tried calling load_font() and it didn't work.....it said the function didn't exist....
Use version 4.2.1.
Okay, I got 4.2.1 but now my compiler returns a warning that says that some functions are "deprecated". What does that meen?
You need to use textprintf_ex, textout_ex, etc now that the older ones are deprecated. It's just a warning, meaning that those functions aren't supposed to be used anymore and could be removed at anytime.
It means that they have been replaced with something better and might go away in the future (like in 1,000 years).
Okay thanks.
You can also try Glyph Keeper. It can load TTF fonts and render text or create Allegro FONTs from them. It can render angled, italic, bold, translucent, antialiased fonts, etc.. Full list of features is here.
You could also scale the font by code (I did this for the menu screen of my current game. Then I replaced the code generated one with a bitmap).
What do I do next?
Use it?
I tried doing this
FONT *myfont; myfont = load_font("myfont.pcx",NULL,NULL); textout_ex(screen,myfont,"Stuff",0,0,makecol(255,255,255),-1);
but it didn't work... am I missing a step? (or 2)
Define 'didn't work'.
When I launched the exe file it crashed in an instant. What's wrong?
What's wrong?
Let me guess...something.
Maybe trying to use a NULL pointer for the font. Did you check to make sure load_font actually succeeded?
I fixed. Ha ha. Stupid problem, I accidentely loaded the file with the wrong name.