Merge pull request #68571 from Calinou/editor-default-disable-code-font-ligatures

Disable code font ligatures by default in the editor
This commit is contained in:
Rémi Verschelde 2022-11-13 15:51:44 +01:00
commit 2abfa9eafe
No known key found for this signature in database
GPG Key ID: C3336907360768E1
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); fc->set_opentype_features(ftrs);
} break; } break;
default: { // Default. default: { // Enabled.
Dictionary ftrs; Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1; ftrs[TS->name_to_tag("calt")] = 1;
fc->set_opentype_features(ftrs); fc->set_opentype_features(ftrs);
@ -2106,7 +2106,7 @@ CodeTextEditor::CodeTextEditor() {
} }
fc->set_opentype_features(ftrs); fc->set_opentype_features(ftrs);
} break; } break;
default: { // Default. default: { // Enabled.
Dictionary ftrs; Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1; ftrs[TS->name_to_tag("calt")] = 1;
fc->set_opentype_features(ftrs); 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); mono_fc->set_opentype_features(ftrs);
} break; } break;
default: { // Default. default: { // Enabled.
Dictionary ftrs; Dictionary ftrs;
ftrs[TS->name_to_tag("calt")] = 1; ftrs[TS->name_to_tag("calt")] = 1;
mono_fc->set_opentype_features(ftrs); 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_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/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_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_opentype_features", "");
_initial_set("interface/editor/code_font_custom_variations", ""); _initial_set("interface/editor/code_font_custom_variations", "");
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_antialiasing", 1, "None,Grayscale,LCD Subpixel") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_antialiasing", 1, "None,Grayscale,LCD Subpixel")