Skip to content

Commit

Permalink
* fonts folder is moddable
Browse files Browse the repository at this point in the history
  • Loading branch information
WALL OF JUSTICE committed Aug 14, 2023
1 parent f2305b7 commit 3f66e88
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ui/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ Font::Font(const char* _name) {
}
#ifdef NINTENDO
path = "rom:/" + path;
#else
if ( PHYSFS_getRealDir(path.c_str()) )
{
std::string realPath = PHYSFS_getRealDir(path.c_str());
path.insert(0, PHYSFS_getDirSeparator());
path.insert(0, realPath);
}
#endif
if ((font = TTF_OpenFont(path.c_str(), pointSize)) == NULL) {
printlog("failed to load '%s': %s", path.c_str(), TTF_GetError());
Expand Down

0 comments on commit 3f66e88

Please sign in to comment.