Disable code font ligatures by default in the editor

This commit is contained in:
Hugo Locurcio 2022-11-12 18:55:57 +01:00
parent c17f17eb98
commit 11842eb738
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
3 changed files with 4 additions and 4 deletions

View file

@ -1872,7 +1872,7 @@ void CodeTextEditor::_apply_settings_change() {
}
fc->set_opentype_features(ftrs);
} break;
default: { // Default.
default: { // Enabled.
Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1;
fc->set_opentype_features(ftrs);
@ -2106,7 +2106,7 @@ CodeTextEditor::CodeTextEditor() {
}
fc->set_opentype_features(ftrs);
} break;
default: { // Default.
default: { // Enabled.
Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1;
fc->set_opentype_features(ftrs);

View file

@ -335,7 +335,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
}
mono_fc->set_opentype_features(ftrs);
} break;
default: { // Default.
default: { // Enabled.
Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1;
mono_fc->set_opentype_features(ftrs);

View file

@ -412,7 +412,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/custom_display_scale", 1.0, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/main_font_size", 14, "8,48,1")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/code_font_size", 14, "8,48,1")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/code_font_contextual_ligatures", 0, "Default,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set")
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/code_font_contextual_ligatures", 1, "Enabled,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set")
_initial_set("interface/editor/code_font_custom_opentype_features", "");
_initial_set("interface/editor/code_font_custom_variations", "");
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_antialiasing", 1, "None,Grayscale,LCD Subpixel")