|
Allegro unable to load font |
Bob Keane
Member #7,342
June 2006
|
I am following the tutorials for allegro 5 and running into a problem. I copied this code from the guide, downloaded the font from the page and copied it to the folder with the executable per the page. When I run the program, I get the error the font could not be loaded. I assumed the download may have been corrupted so I googled and downloaded the font from the web and tried again. Still no luck. I tried using one of the fonts from my distro and it did not work. I checked the forums, and this thread suggests I may have a buggy version of allegro so I removed and reinstalled Allegro through package manager. Still no luck. Any ideas By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
See Current Working Directory. You have to run the exe from the folder where it is located. CB will run it from a different directory, depending on whether or not you've changed your project structure. To fix this permanently, and to offer a more flexible solution, you can change the current working directory yourself using allegro 5 : ALLEGRO_PATH* p = al_get_standard_path(ALLEGRO_RESOURCES_PATH); al_change_directory(al_path_cstr(p , ALLEGRO_NATIVE_PATH_SEP)); al_destroy_path(p); p = 0;
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bob Keane
Member #7,342
June 2006
|
Always something simple. Thanks. Someone may want to take a look at the tutorial, this is what I get: {"name":"611896","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/5\/e5ea9d6646c847bb06e84e0f39672f54.png","w":1366,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/5\/e5ea9d6646c847bb06e84e0f39672f54"} By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
|