From d211c05111eed90baa7e70cb4e818fd328e97770 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 16 Jun 2020 20:34:48 +0200 Subject: 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). --- scene/resources/default_theme/SCsub | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scene/resources/default_theme/SCsub') 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), +) -- cgit v1.2.3