So originally in my new project I was using arial, but I switched to another font. But for some reason it won't register the change I made. It keeps saying "Failed to load font "arial.ttf" (failed to create the font face)" despite the fact that I changed the code, the files, etc. I've tried moving the font files, deleting various files that visual studio generates, and I've made zero progress.
Using VS17
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <iostream>
#include <SFML/Graphics.hpp>
#include <string>
#include <iostream>
#include <vector>
#include <fstream>
/**
Main, has the game loop
*/
int main() {
// Making the window
sf::RenderWindow window(sf::VideoMode(1776, 1000), "Axis of Evil");
window.setFramerateLimit(30);
sf::Font fnt;
if (!fnt.loadFromFile("cr.ttf")) {
std::cout << "Could not load font\n";
}
/*
Game loop
*/
while (window.isOpen()) {
// Allows the window to be closeable
sf::Event e;
while (window.pollEvent(e)) {
if (e.type == sf::Event::Closed)
window.close();
}
// Hides the console
//HWND hWnd = GetConsoleWindow();
//ShowWindow(hWnd, SW_HIDE);
// Drawing to the SFML window
window.clear();
window.display();
}
return 0;
}
All of the code for my proj so far.