I am getting this error... "Failed to load font "Georgia.ttf" (failed to create the font face)".
The spelling in my program is correct. And I've more than triple checked that it's in the right location. I've also tried using different fonts, to no avail. Note that in a separate program, the font georgia DOES work
I'm using Xcode if that's any help.
SFML 2.1
And I use a macbook, OS 10.7.5
.cpp
#include <SFML/Graphics.hpp>
#include <main.hpp>
//GlobalVariables (I know they're bad, I'll work on this)
sf::RenderWindow window;
sf::Event event;
sf::Keyboard keyboard;
sf::Font georgia;
//class Initialization______________________________________________
void Initialization::programInit()
{
renderWindow();
loadGeorgia();
}
void Initialization::renderWindow()
{
window.create(sf::VideoMode(width, height), "Pong", sf::Style::Default);
window.setFramerateLimit(frameLimit);
window.setVerticalSyncEnabled(true);
window.clear(sf::Color::White);
}
bool Initialization::loadGeorgia()
{
if(!georgia.loadFromFile("Georgia.ttf"))
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
//main()______________________________________________
int main()
{
init.programInit();
gameFlow.beginGameFlow(); //I didn't include this class, but this is where the font is used
return EXIT_SUCCESS;
}
.hpp
#ifndef Pong2_Header_h
#define Pong2_Header_h
class Initialization
{
public:
static const int width = 800;
static const int height = 600;
static const int frameLimit = 60;
void programInit();
void renderWindow();
bool loadGeorgia();
};
Initialization init;
int main();
#endif