1
Graphics / Can't Load Fonts When Running from the Terminal
« on: June 11, 2022, 06:14:28 pm »
When I run the .exe directly it works perfectly fine, and everything loads accordingly. In addition, when I run "make" to build the project there are no errors. However, when I run ./bin/zombies I get an error:
Failed to load font "../assets/fonts/font.ttf" (failed to create the font face)
Here is the layout of my files:
/Zombies/bin/zombies.exe
/Zombies/assets/fonts/font.ttf
/Zombies/src/main.cpp
Here is the code I use in my .cpp file:
This means I can't debug with GDB since I can't run it from the terminal. Any idea on why this is?
Failed to load font "../assets/fonts/font.ttf" (failed to create the font face)
Here is the layout of my files:
/Zombies/bin/zombies.exe
/Zombies/assets/fonts/font.ttf
/Zombies/src/main.cpp
Here is the code I use in my .cpp file:
font.loadFromFile("../assets/fonts/font.ttf");
This means I can't debug with GDB since I can't run it from the terminal. Any idea on why this is?