summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-05-20 01:31:25 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-05-20 01:31:25 +0200
commit383a27e930d1a647c69981afc915b08b9a972122 (patch)
tree987d22812362ff59674203c7a0f87f747a915874 /scene/resources
parent920ca6252888489ca72647ad8d5ef721d5e5e686 (diff)
Tweak the default font's fake italic to better match Open Sans Italic
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/default_theme/default_theme.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 4fb44446d9..0c2999a700 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -1069,6 +1069,7 @@ void make_default_theme(float p_scale, Ref<Font> p_font, TextServer::SubpixelPos
bold_font.instantiate();
for (int i = 0; i < default_font->get_data_count(); i++) {
Ref<FontData> data = default_font->get_data(i)->duplicate();
+ // Try to match OpenSans ExtraBold.
data->set_embolden(1.2);
bold_font->add_data(data);
}
@@ -1076,15 +1077,17 @@ void make_default_theme(float p_scale, Ref<Font> p_font, TextServer::SubpixelPos
bold_italics_font.instantiate();
for (int i = 0; i < default_font->get_data_count(); i++) {
Ref<FontData> data = default_font->get_data(i)->duplicate();
+ // Try to match OpenSans ExtraBold Italic.
data->set_embolden(1.2);
- data->set_transform(Transform2D(1.0, 0.4, 0.0, 1.0, 0.0, 0.0));
+ data->set_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
bold_italics_font->add_data(data);
}
italics_font.instantiate();
for (int i = 0; i < default_font->get_data_count(); i++) {
Ref<FontData> data = default_font->get_data(i)->duplicate();
- data->set_transform(Transform2D(1.0, 0.4, 0.0, 1.0, 0.0, 0.0));
+ // Try to match OpenSans Italic.
+ data->set_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0));
italics_font->add_data(data);
}
}