lookup linux font on runtime

This commit is contained in:
2024-01-29 12:36:37 +01:00
parent 2a29f01fc2
commit 5f7b9aa116
3 changed files with 19 additions and 14 deletions

View File

@@ -41,6 +41,7 @@ public:
*/
TextScreen(const std::string &text, SDL_Point *screenSize, std::optional<SDL_Point> basePosition) : hasUpdated(
false), screenSize(screenSize), basePosition(basePosition) {
const char *defaultFontPath = getDefaultFontPath();
if (defaultFontPath == nullptr) {
std::cerr << "Font path is not set for this platform (null)" << std::endl;
exit(-1);