Load the font you were asked to.

This commit is contained in:
Dag-Erling Smørgrav 2021-10-15 03:50:17 +02:00
parent cce98514a7
commit 95f8f075db

View file

@ -190,7 +190,7 @@ sf::Texture Canvas::loadTexture(std::string_view path) {
sf::Font Canvas::loadFont(std::string_view path) {
sf::Font font;
if (!font.loadFromFile("retro_font.ttf")) {
if (!font.loadFromFile(std::string{ path })) {
exitFailure(fmt::format("Failed to load font {}", path));
}
return font;