I've been trying to develop a cross-platform application for Windows and Linux using SFML. Everything's been going fine so far, except that the Windows version cannot seem to load fonts. I have no issues under Linux however. I did my research and made sure the file was in place, according to where I was executing from, but sf::Font::loadFromFile still returns false.
Here's the code:
sf::Font _font;
sf::Text _text;
if (!(_font.loadFromFile("resources/fonts/arial.ttf")))
{
std::cerr << "Error loading font '" + font + "'" << std::endl;
return;
}
_text.setFont(_font);
Do you guys have any idea what I'm doing wrong here?
I'm using SFML 2.3, linking statically.
Update: the loadFromFile methods doesn't work either for textures. I can check programmatically that the files are in place, and opening them with ifstreams works fine, but SFML cannot seem to access them.