summaryrefslogtreecommitdiff
path: root/editor/editor_fonts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_fonts.cpp')
-rw-r--r--editor/editor_fonts.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index c65bfa6472..0c9a7b2972 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -269,12 +269,15 @@ void editor_register_fonts(Ref<Theme> p_theme) {
/* Hack */
- Ref<FontData> dfmono = load_cached_internal_font(_font_Hack_Regular, _font_Hack_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> dfmono = load_cached_internal_font(_font_JetBrainsMono_Regular, _font_JetBrainsMono_Regular_size, font_hinting, font_antialiased, true);
+ Dictionary opentype_features;
+ opentype_features["calt"] = 0;
+ dfmono->set_opentype_feature_overrides(opentype_features); // Disable contextual alternates (coding ligatures).
// Default font
MAKE_DEFAULT_FONT(df, String());
- p_theme->set_default_theme_font(df); // Default theme font
- p_theme->set_default_theme_font_size(default_font_size);
+ p_theme->set_default_font(df); // Default theme font
+ p_theme->set_default_font_size(default_font_size);
p_theme->set_font_size("main_size", "EditorFonts", default_font_size);
p_theme->set_font("main", "EditorFonts", df);