mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Editor font: do not embolden the Main Font if it's variable
(cherry picked from commit d719fc74f5
)
This commit is contained in:
parent
f5b146cc61
commit
0990896d91
1 changed files with 6 additions and 2 deletions
|
@ -286,7 +286,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
|
||||||
custom_font->set_fallbacks(fallback_custom);
|
custom_font->set_fallbacks(fallback_custom);
|
||||||
}
|
}
|
||||||
bold_fc->set_base_font(custom_font);
|
bold_fc->set_base_font(custom_font);
|
||||||
bold_fc->set_variation_embolden(embolden_strength);
|
if (!custom_font->get_supported_variation_list().has(TS->name_to_tag("wght"))) {
|
||||||
|
bold_fc->set_variation_embolden(embolden_strength);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", "");
|
EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", "");
|
||||||
bold_fc->set_base_font(default_font_bold);
|
bold_fc->set_base_font(default_font_bold);
|
||||||
|
@ -313,7 +315,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
|
||||||
custom_font->set_fallbacks(fallback_custom);
|
custom_font->set_fallbacks(fallback_custom);
|
||||||
}
|
}
|
||||||
bold_fc_msdf->set_base_font(custom_font);
|
bold_fc_msdf->set_base_font(custom_font);
|
||||||
bold_fc_msdf->set_variation_embolden(embolden_strength);
|
if (!custom_font->get_supported_variation_list().has(TS->name_to_tag("wght"))) {
|
||||||
|
bold_fc_msdf->set_variation_embolden(embolden_strength);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", "");
|
EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", "");
|
||||||
bold_fc_msdf->set_base_font(default_font_bold_msdf);
|
bold_fc_msdf->set_base_font(default_font_bold_msdf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue