#include <allegro.h>
#include <alfont.h>
// Main - entry point for the application
int main()
{
allegro_init();
install_keyboard();
install_timer();
install_mouse();
set_color_depth(32);
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 1024, 768, 0, 0);
set_display_switch_mode(SWITCH_PAUSE);
set_window_title("Alfont Test");
ALFONT_FONT* User_Font;
if(alfont_init() != ALFONT_OK)
{
allegro_message("Failed to initialise AlFont!");
}
User_Font = alfont_load_font("E:\\Glenn.TTF");
if(User_Font == NULL)
{
allegro_message("Failed");
}
alfont_set_font_size(User_Font, 60);
alfont_textout_aa(screen, User_Font, "Test Message", 200, 200, makecol(255,255,255));
show_mouse(screen);
readkey();
alfont_destroy_font(User_Font);
alfont_exit();
allegro_exit();
return(0);
}
END_OF_MAIN();
Any ideas?
Alfont problems
Alfont - doesn't fail, but only displays a long black block and no text!
Answered. [smile]
Jesus saves ... the rest of you take 2d4 fire damage.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement