diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-19 12:53:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 12:53:41 +0100 |
commit | 49eea481ec962111f1436564096fdbe64d06de9c (patch) | |
tree | 6f8c71f7449c896e2dc714683b95710e025eceae | |
parent | b068961c8fe51daa388cfd14021712b00fd9aec7 (diff) | |
parent | 8981924fbe00f80582ccec830b040428016eedfd (diff) |
Merge pull request #14821 from ibrahn/fnt-load-root-fix
BitmapFont::create_from_fnt loading file from project root.
-rw-r--r-- | scene/resources/font.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 2b44ea4554..8510669d6c 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -257,8 +257,8 @@ Error BitmapFont::create_from_fnt(const String &p_file) { if (keys.has("file")) { - String file = keys["file"]; - file = p_file.get_base_dir() + "/" + file; + String base_dir = p_file.get_base_dir(); + String file = base_dir.plus_file(keys["file"]); Ref<Texture> tex = ResourceLoader::load(file); if (tex.is_null()) { ERR_PRINT("Can't load font texture!"); |