I’ve spent a lot of time trying to figure this out.
What I know:
- Slick2D defaults to top left
- Lwjgl in my game uses bottom left
- TrueTypeFont is deprecated
- AngelCodeFont is recommended
- You use BMFont to create the 2 files in which you use to load a new AngelCodeFont
- You load that as a normal object would
- you draw it like font.draw(x,y,string);
So… I looked up various steps on the correct way to make a font through this. I just wanted a simple Times New Roman font…
I’ll take some pictures and show them here of everything I did.
Font Settings: http://gyazo.com/e04f3dd344a04fee9eec16868b252c7d
Export Settings: http://gyazo.com/7bc3e37b0cd4e9e737fd32155a2edf2e
Main Screen: http://gyazo.com/e4f97e34c668f04baec1eace37de17d4
and the png comes out to be this: http://gyazo.com/87e2227f707feae51ba3fd04117af525
I swear I’ve never used BMFont before and I have no clue what I’m doing. I’m just following what people say.
Also I use it within the code like this:
try
{
font = new AngelCodeFont("newfont.fnt", new Image("newfont_0.png"));
}
catch (SlickException e)
{
e.printStackTrace();
}
font.drawString(100, 50, "hi", Color.black);
It literally comes out as a black rectangle. So idk. Any advice? Am I using BMFont incorrectly?
EDIT: to make clear, when i use the color white it comes out weird also.
http://gyazo.com/36b4022dde72302a831f4250fbd9d008
(Ignore the brown, that’s my background color)