From 8981924fbe00f80582ccec830b040428016eedfd Mon Sep 17 00:00:00 2001 From: Ibrahn Sahir Date: Tue, 19 Dec 2017 10:36:03 +0000 Subject: fix for BitmapFont::create_from_fnt to allow loading from file in project root directory. --- scene/resources/font.cpp | 4 ++-- 1 file 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 tex = ResourceLoader::load(file); if (tex.is_null()) { ERR_PRINT("Can't load font texture!"); -- cgit v1.2.3