Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix editor custom font variation resetting to defaults randomly

senseibobo94150a119994
diff --git a/editor/gui/code_editor.cpp b/editor/gui/code_editor.cpp
index 906520a0595..98ac7adcb42 100644
--- a/editor/gui/code_editor.cpp
+++ b/editor/gui/code_editor.cpp
@@ -1702,7 +1702,7 @@ void CodeTextEditor::_update_font_ligatures() {
} break;
}
Vector<String> variation_tags = String(EDITOR_GET("interface/editor/fonts/code_font_custom_variations")).split(",");
- Dictionary variations_mono;
+ Dictionary variations_mono = fc->get_variation_opentype();
for (int i = 0; i < variation_tags.size(); i++) {
Vector<String> subtag_a = variation_tags[i].split("=");
if (subtag_a.size() == 2) {
diff --git a/scene/theme/theme_db.cpp b/scene/theme/theme_db.cpp
index 931f324991c..a5ef7c6ae06 100644
--- a/scene/theme/theme_db.cpp
+++ b/scene/theme/theme_db.cpp
@@ -77,7 +77,7 @@ void ThemeDB::initialize_theme() {
Ref<Font> project_font;
if (!project_font_path.is_empty()) {
- project_font = ResourceLoader::load(project_font_path);
+ project_font = ResourceLoader::load(project_font_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
if (project_font.is_valid()) {
set_fallback_font(project_font);
} else {