//Initialize SDL_ttf
if( TTF_Init() == -1 )
{
return;
}
//Open the font
TTF_Font * font = TTF_OpenFont( "lazy.ttf", 28 );
//If there was an error in loading the font
if( font == NULL )
{
char* error = TTF_GetError();
return;
}
[SDL] TTF_OpenFont error
For some reason I am having trouble with opening a font. My error comes back "couldn't open font". I am using Code::Block gcc. Any ideas?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement