Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/classes/EditorSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -899,9 +899,11 @@
</member>
<member name="interface/editor/main_font" type="String" setter="" getter="">
The font to use for the editor interface. Must be a resource of a [Font] type such as a [code].ttf[/code] or [code].otf[/code] font file.
[b]Note:[/b] If the provided font is variable, a weight of 400 (normal) will be used.
</member>
<member name="interface/editor/main_font_bold" type="String" setter="" getter="">
The font to use for bold text in the editor interface. Must be a resource of a [Font] type such as a [code].ttf[/code] or [code].otf[/code] font file.
[b]Note:[/b] If the provided font is variable, a weight of 700 (bold) will be used.
</member>
<member name="interface/editor/main_font_size" type="int" setter="" getter="">
The size of the font in the editor interface.
Expand Down
8 changes: 8 additions & 0 deletions editor/themes/editor_fonts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
}
default_fc->set_spacing(TextServer::SPACING_TOP, -EDSCALE);
default_fc->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE);
Dictionary default_fc_opentype;
default_fc_opentype["weight"] = 400;
default_fc->set_variation_opentype(default_fc_opentype);

Ref<FontVariation> default_fc_msdf;
default_fc_msdf.instantiate();
Expand All @@ -265,6 +268,7 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
}
default_fc_msdf->set_spacing(TextServer::SPACING_TOP, -EDSCALE);
default_fc_msdf->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE);
default_fc_msdf->set_variation_opentype(default_fc_opentype);

Ref<FontVariation> bold_fc;
bold_fc.instantiate();
Expand All @@ -289,6 +293,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
}
bold_fc->set_spacing(TextServer::SPACING_TOP, -EDSCALE);
bold_fc->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE);
Dictionary bold_fc_opentype;
bold_fc_opentype["weight"] = 700;
bold_fc->set_variation_opentype(bold_fc_opentype);

Ref<FontVariation> bold_fc_msdf;
bold_fc_msdf.instantiate();
Expand All @@ -313,6 +320,7 @@ void editor_register_fonts(const Ref<Theme> &p_theme) {
}
bold_fc_msdf->set_spacing(TextServer::SPACING_TOP, -EDSCALE);
bold_fc_msdf->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE);
bold_fc_msdf->set_variation_opentype(bold_fc_opentype);

Ref<FontVariation> mono_fc;
mono_fc.instantiate();
Expand Down