I'm having a hard time getting a font loaded. I'm sure it's not a working directory problem because I've checked in my code that I'm manually applying the full path. The error I get is:
S:\Documents\Visual Studio 2015\Projects\UDPJoySend\x64\Debug\arial.ttf
000007FEFA591120Failed to load font "
string workingdir()
{
char buf[256];
GetCurrentDirectoryA(256, buf);
return string(buf) + '\\';
}
int main(int argc, char *argv[])
{
RenderWindow window(VideoMode(800, 600), "UDP Joystick Sender");
window.setFramerateLimit(10);
string fontfile = workingdir() + "arial.ttf";
cout << fontfile << "\n";
if (!font.loadFromFile(fontfile))
{
cout << err;
return 0;
}
.......
cout << "Exiting\n";
return 0;
}
As you can see it's not telling me WHAT file name it's failing to load. I've tried it with just the name of the font, and this working dir option. The font exists in the path shown in the cout line before the error. Thoughts?