Merge pull request #15073 from volzhs/editor-custom-font

Use .ttf or .otf file for editor custom font
This commit is contained in:
Rémi Verschelde 2018-01-03 10:44:19 +01:00 committed by GitHub
commit edd78d54c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 13 deletions

View file

@ -1135,16 +1135,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;
}