summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-05-04 15:06:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-05-04 15:06:41 -0300
commit2a02d3f96f8fa3ed844a9abf58c0bf4d8023ebcc (patch)
treed0ccaa72576f155b1b02b8cd7680eea3df684ed3 /tools
parentfbbe7dcdfbd09fc6ef5614dea2183481a27e4f4e (diff)
fix font import path on windows, closes #1675
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_import_export.cpp1
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp7
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index d76009a72a..4e6435b22e 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -47,6 +47,7 @@ String EditorImportPlugin::validate_source_path(const String& p_path) {
String rp = Globals::get_singleton()->get_resource_path();
if (!rp.ends_with("/"))
rp+="/";
+
return rp.path_to_file(gp);
}
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index b0ff6f6e74..375333ddf6 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -406,7 +406,10 @@ class EditorFontImportDialog : public ConfirmationDialog {
imd->set_option(opt,v);
}
- imd->add_source(EditorImportPlugin::validate_source_path(source->get_line_edit()->get_text()));
+ String src_path = EditorImportPlugin::validate_source_path(source->get_line_edit()->get_text());
+ //print_line("pre src path "+source->get_line_edit()->get_text());
+ //print_line("src path "+src_path);
+ imd->add_source(src_path);
imd->set_option("font/size",font_size->get_val());
return imd;
@@ -1018,7 +1021,7 @@ Ref<Font> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMetadata
int h = slot->bitmap.rows;
int p = slot->bitmap.pitch;
- print_line("W: "+itos(w)+" P: "+itos(slot->bitmap.pitch));
+ //print_line("W: "+itos(w)+" P: "+itos(slot->bitmap.pitch));
if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) {