Use .ttf or .otf file for editor custom font

This commit is contained in:
volzhs
2017-12-27 03:14:48 +09:00
parent edd3bd8cb8
commit 2c8ebab93b
3 changed files with 17 additions and 13 deletions

View File

@@ -1100,16 +1100,5 @@ Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) {
theme = create_editor_theme(p_theme);
}
String global_font = EditorSettings::get_singleton()->get("interface/editor/custom_font");
if (global_font != "") {
Ref<Font> fnt = ResourceLoader::load(global_font);
if (fnt.is_valid()) {
if (!theme.is_valid()) {
theme.instance();
}
theme->set_default_theme_font(fnt);
}
}
return theme;
}