Hi, thaks for advance
I try to open a .ttf file I try to do:
ALLEGRO_FONT *font = al_load_ttf_font("font.ttf",12,0 );
But that way search the "font.ttf" in my user path, and not the path I have the program. So I try to do:
the first time I call funcion() goes well, but de second goes wrong I try to do this step by step and I think the problem is this line:
path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);
Maybe I have to do it a diferent way, because here I'm using absolute path, I prefer know to how use relative path but I dont know how implement this
I try to run the same code with out using all the Path's things and it's works but my .ttf has to be in my local path. :/
thanks, if you dont understand some think ask please
and sorry for my bad english.
thanks
First off, decide where you are going to keep your font - ie. :
program_directory/font.ttf
If you are always going to have font.ttf in the same directory as your program, then use ALLEGRO_EXENAME_PATH as the id to al_get_standard_path.
the first time I call funcion() goes well, but de second goes wrong I try to do this step by step and I think the problem is this line:
It doesn't work the second time because it calls al_shutdown_ttf_addon and al_shutdown_font_addon the first time it is called, so loading fonts will no longer work. You don't need to call any shutdown functions directly, as Allegro will do it for you. You're only responsible for destroying any objects you create.