|
How do I get a larger text size and different fonts? |
blargmob
Member #8,356
February 2007
|
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? --- |
Onewing
Member #6,152
August 2005
|
------------ |
type568
Member #8,381
March 2007
|
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
|
Kikaru
Member #7,616
August 2006
|
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... |
blargmob
Member #8,356
February 2007
|
So how do I make a .fnt file? --- |
ImLeftFooted
Member #3,935
October 2003
|
Quote: 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. |
Matthew Leverton
Supreme Loser
January 1999
|
blargmob
Member #8,356
February 2007
|
Wait a minute...... I tried calling load_font() and it didn't work.....it said the function didn't exist.... --- |
Matthew Leverton
Supreme Loser
January 1999
|
Use version 4.2.1. |
blargmob
Member #8,356
February 2007
|
Okay, I got 4.2.1 but now my compiler returns a warning that says that some functions are "deprecated". What does that meen? --- |
BAF
Member #2,981
December 2002
|
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. |
Matthew Leverton
Supreme Loser
January 1999
|
It means that they have been replaced with something better and might go away in the future (like in 1,000 years). |
blargmob
Member #8,356
February 2007
|
Okay thanks. --- |
Kirr
Member #5,060
September 2004
|
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. -- |
James Stanley
Member #7,275
May 2006
|
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). |
blargmob
Member #8,356
February 2007
|
Onewing
Member #6,152
August 2005
|
Quote: What do I do next? Use it? ------------ |
blargmob
Member #8,356
February 2007
|
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) --- |
Kitty Cat
Member #2,815
October 2002
|
Define 'didn't work'. -- |
blargmob
Member #8,356
February 2007
|
When I launched the exe file it crashed in an instant. What's wrong? --- |
Onewing
Member #6,152
August 2005
|
Quote: What's wrong? Let me guess...something. ------------ |
Kitty Cat
Member #2,815
October 2002
|
Maybe trying to use a NULL pointer for the font. Did you check to make sure load_font actually succeeded? -- |
blargmob
Member #8,356
February 2007
|
I fixed. Ha ha. Stupid problem, I accidentely loaded the file with the wrong name. --- |
|