From 5bb7cef8367e77c70b9a1ad045741fb97b32ef9d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 1 May 2016 23:12:30 -0300 Subject: Support for dynamic fonts (TTF) Added support for DynamicFont, which can load a TTF of any size to use as a font. No import required. --- core/globals.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/globals.cpp b/core/globals.cpp index c0c1171ae6..020e05fb8f 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -54,7 +54,7 @@ String Globals::localize_path(const String& p_path) const { if (resource_path=="") return p_path; //not initialied yet - if (p_path.find(":/") != -1) + if (p_path.begins_with("res://") || p_path.begins_with("user://")) return p_path.simplify_path(); @@ -82,6 +82,8 @@ String Globals::localize_path(const String& p_path) const { if (sep == -1) { return "res://"+path; }; + + String parent = path.substr(0, sep); String plocal = localize_path(parent); -- cgit v1.2.3