summaryrefslogtreecommitdiff
path: root/scene/resources/default_theme/SCsub
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-06-16 20:34:48 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-05-17 15:19:13 +0200
commitd211c05111eed90baa7e70cb4e818fd328e97770 (patch)
tree39fa4e825c21df9ba0b7bc0d7465536141ff50f4 /scene/resources/default_theme/SCsub
parentc6bef537274e65620b40b9f5f1937d2332a249df (diff)
Use a DynamicFont for the default project theme
This makes font oversampling work out of the box, while also increasing the supported character set's size. The default font is now larger as well to better fit today's screen resolutions. The OpenSans SemiBold font was chosen for two reasons: - Small file size, yet its character set supports Latin-1 and Cyrillic text. - A heavier font weight looks better in most "game" scenarios and is more readable against mixed-color backgrounds. This is considered a breaking change as it changes the default font's metrics, which will likely affect how Control nodes are laid out in scenes (unless a custom font is in use).
Diffstat (limited to 'scene/resources/default_theme/SCsub')
-rw-r--r--scene/resources/default_theme/SCsub12
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/default_theme/SCsub b/scene/resources/default_theme/SCsub
index fc61250247..0fb6bb2c62 100644
--- a/scene/resources/default_theme/SCsub
+++ b/scene/resources/default_theme/SCsub
@@ -2,4 +2,16 @@
Import("env")
+import os
+import os.path
+from platform_methods import run_in_subprocess
+import default_theme_builders
+
env.add_source_files(env.scene_sources, "*.cpp")
+
+env.Depends("#scene/resources/default_theme/default_font.gen.h", "#thirdparty/fonts/OpenSans_SemiBold.ttf")
+env.CommandNoCache(
+ "#scene/resources/default_theme/default_font.gen.h",
+ "#thirdparty/fonts/OpenSans_SemiBold.ttf",
+ run_in_subprocess(default_theme_builders.make_fonts_header),
+)