Browse Source

Disable code font ligatures by default in the editor

Hugo Locurcio 2 years ago
parent
commit
11842eb738
3 changed files with 4 additions and 4 deletions
  1. 2 2
      editor/code_editor.cpp
  2. 1 1
      editor/editor_fonts.cpp
  3. 1 1
      editor/editor_settings.cpp

+ 2 - 2
editor/code_editor.cpp

@@ -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);

+ 1 - 1
editor/editor_fonts.cpp

@@ -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);

+ 1 - 1
editor/editor_settings.cpp

@@ -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")