Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cmfox

Pages: [1]
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:
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?

Pages: [1]
anything