Merge pull request #59113 from bruvzg/sim_cjk_bold

This commit is contained in:
Rémi Verschelde 2022-03-13 17:28:22 +01:00 committed by GitHub
commit da37e08a42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,8 +64,8 @@
m_name->add_data(FontTamilBold); \ m_name->add_data(FontTamilBold); \
m_name->add_data(FontTeluguBold); \ m_name->add_data(FontTeluguBold); \
m_name->add_data(FontThaiBold); \ m_name->add_data(FontThaiBold); \
m_name->add_data(FontJapanese); \ m_name->add_data(FontJapaneseBold); \
m_name->add_data(FontFallback); m_name->add_data(FontFallbackBold);
#define MAKE_DEFAULT_FONT(m_name, m_variations) \ #define MAKE_DEFAULT_FONT(m_name, m_variations) \
Ref<Font> m_name; \ Ref<Font> m_name; \
@ -268,6 +268,13 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<FontData> FontFallback = load_cached_internal_font(_font_DroidSansFallback, _font_DroidSansFallback_size, font_hinting, font_antialiased, true, font_subpixel_positioning); Ref<FontData> FontFallback = load_cached_internal_font(_font_DroidSansFallback, _font_DroidSansFallback_size, font_hinting, font_antialiased, true, font_subpixel_positioning);
Ref<FontData> FontJapanese = load_cached_internal_font(_font_DroidSansJapanese, _font_DroidSansJapanese_size, font_hinting, font_antialiased, true, font_subpixel_positioning); Ref<FontData> FontJapanese = load_cached_internal_font(_font_DroidSansJapanese, _font_DroidSansJapanese_size, font_hinting, font_antialiased, true, font_subpixel_positioning);
const float embolden_strength = 0.6;
Ref<FontData> FontFallbackBold = FontFallback->duplicate();
FontFallbackBold->set_embolden(embolden_strength);
Ref<FontData> FontJapaneseBold = FontJapanese->duplicate();
FontJapaneseBold->set_embolden(embolden_strength);
/* Hack */ /* Hack */
Ref<FontData> dfmono = load_cached_internal_font(_font_JetBrainsMono_Regular, _font_JetBrainsMono_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning); Ref<FontData> dfmono = load_cached_internal_font(_font_JetBrainsMono_Regular, _font_JetBrainsMono_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning);