fix pathfinder for fonts

This commit is contained in:
darkrose 2014-11-17 18:34:40 +10:00
parent eaa90c0086
commit 9e960d175b
1 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ std::string getPath(const char* tp, const std::string &filename, bool must_exist
std::string data_path = g_settings->get("data_path");
if (data_path != "") {
std::string testpath = data_path + DIR_DELIM + rel_path;
if (type == "model" || type == "html" || type == "sound") {
if (type == "model" || type == "html" || type == "sound" || type == "font") {
if (fs::PathExists(testpath))
fullpath = std::string(testpath);
}else{
@ -160,7 +160,7 @@ std::string getPath(const char* tp, const std::string &filename, bool must_exist
/* check from user data directory */
if (fullpath == "") {
std::string testpath = porting::path_userdata + DIR_DELIM + rel_path;
if (type == "model" || type == "html" || type == "sound") {
if (type == "model" || type == "html" || type == "sound" || type == "font") {
if (fs::PathExists(testpath))
fullpath = std::string(testpath);
}else{
@ -171,7 +171,7 @@ std::string getPath(const char* tp, const std::string &filename, bool must_exist
/* check from default data directory */
if (fullpath == "") {
std::string testpath = porting::path_data + DIR_DELIM + rel_path;
if (type == "model" || type == "html" || type == "sound") {
if (type == "model" || type == "html" || type == "sound" || type == "font") {
if (fs::PathExists(testpath))
fullpath = std::string(testpath);
}else{