So i've been using Allegro 5 to create a client and I just recently got to the font part. I started off by trying to load the arial TTF font. It failed. The odd thing about this is I had made another program using the exact same font(it was identical code) and it worked on my other computer. But it fails here. I am quite confused right now why this could be.The order that I initialize the addons. Not sure if it matters.

I tried checking if it fails initializing but it doesn't. Then I copied the arial font into the folder and tried that, nothing. Then I renamed the arial font to arialFont.ttf and still nothing. Not sure what else it could be.

Edit: I'm really bad at reading text after code. I saw the code then skipped over that last message of me showing you that code. Anyways, I don't want to throw it all at you so i'll just give you the file that it is in. If you think it could be anything else tell me.

Note: I do use a A5 wrapper class that a friend of mine has made. It pretty much is the same as any others code. And so you know, when something doesn't work I try to comment it out and make it more simple. I remove it all once I fix it

Yes William I did and it is fine. I'll post the code, it'll have to be a few files of coding.

Note: I do use a5ses(Allegro 5 Sepples Edition, just a C++ wrapper). I am quite sure that it is not the problem because the creator has gotten the font to work before. If you would like to research it just in case, this is the link: a5ses.

Now, the next file is in "renderer/States/MainMenu.cpp". Most of this code I don't believe is relevant until you get to the part where it loads the font. So you know, I started with a5::Font, moved to al_load_font, and finally al_load_ttf_font. They all had failed.

Alright, I think we're getting closer and closer to solving this. I found another peice of interesting information. It seems that it loads the font fine only if it's before this line of code in main "Client *client = new Client();" and after it it will always fail. Here is what the constructor contains. Any ideas on how to fix it or what might be causing it?

settings.Read is just opening a file to read line by line. I doubt it's the problem. But I do think it may be new Renderer. Here is the constructor. This is where the screen is created, so that may be the problem.

Don't worry about that. settings is a Config class. The Config classes base is a map. So if this is the config file:Test = 0Rawr = noThe Config class would have this in the array:Test => 0Rawr => "no"

I'm almost positive of the problem now. I was using PHYSFS for loading bitmaps and it was calling al_set_physfs_interface inside the BitmapLoader interface. So I decided to call it in the main function instead but it's still having problems.

Edit: Finally solved it. God, it was so simple, but that's how most of my errors go. The problem was that I was using PHYSFS and whenever it was searching for the font, it was looking in the search paths. Thank you all for the help.