summaryrefslogtreecommitdiff
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp53
1 files changed, 30 insertions, 23 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 2cf0bed7d0..0840707886 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -158,10 +158,10 @@ void EditorSettings::_initial_set(const StringName &p_name, const Variant &p_val
struct _EVCSort {
String name;
- Variant::Type type;
- int order;
- bool save;
- bool restart_if_changed;
+ Variant::Type type = Variant::Type::NIL;
+ int order = 0;
+ bool save = false;
+ bool restart_if_changed = false;
bool operator<(const _EVCSort &p_vcs) const { return order < p_vcs.order; }
};
@@ -262,13 +262,30 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
String host_lang = OS::get_singleton()->get_locale();
host_lang = TranslationServer::standardize_locale(host_lang);
- // Some locales are not properly supported currently in Godot due to lack of font shaping
- // (e.g. Arabic or Hindi), so even though we have work in progress translations for them,
- // we skip them as they don't render properly. (GH-28577)
- const Vector<String> locales_to_skip = String("ar,bn,fa,he,hi,ml,si,ta,te,ur").split(",");
+ // Skip locales if Text server lack required features.
+ Vector<String> locales_to_skip;
+ if (!TS->has_feature(TextServer::FEATURE_BIDI_LAYOUT) || !TS->has_feature(TextServer::FEATURE_SHAPING)) {
+ locales_to_skip.push_back("ar"); // Arabic
+ locales_to_skip.push_back("fa"); // Persian
+ locales_to_skip.push_back("ur"); // Urdu
+ }
+ if (!TS->has_feature(TextServer::FEATURE_BIDI_LAYOUT)) {
+ locales_to_skip.push_back("he"); // Hebrew
+ }
+ if (!TS->has_feature(TextServer::FEATURE_SHAPING)) {
+ locales_to_skip.push_back("bn"); // Bengali
+ locales_to_skip.push_back("hi"); // Hindi
+ locales_to_skip.push_back("ml"); // Malayalam
+ locales_to_skip.push_back("si"); // Sinhala
+ locales_to_skip.push_back("ta"); // Tamil
+ locales_to_skip.push_back("te"); // Telugu
+ }
- String best;
+ if (!locales_to_skip.empty()) {
+ WARN_PRINT("Some locales are not properly supported by selected Text Server and are disabled.");
+ }
+ String best;
EditorTranslationList *etl = _editor_translations;
while (etl->data) {
@@ -316,6 +333,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/editor/main_font_size"] = PropertyInfo(Variant::INT, "interface/editor/main_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/code_font_size", 14);
hints["interface/editor/code_font_size"] = PropertyInfo(Variant::INT, "interface/editor/code_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT);
+ _initial_set("interface/editor/code_font_contextual_ligatures", 0);
+ hints["interface/editor/code_font_contextual_ligatures"] = PropertyInfo(Variant::INT, "interface/editor/code_font_contextual_ligatures", PROPERTY_HINT_ENUM, "Default,Disable contextual alternates (coding ligatures),Use custom OpenType feature set", PROPERTY_USAGE_DEFAULT);
+ _initial_set("interface/editor/code_font_custom_opentype_features", "");
+ _initial_set("interface/editor/code_font_custom_variations", "");
_initial_set("interface/editor/font_antialiased", true);
_initial_set("interface/editor/font_hinting", 0);
hints["interface/editor/font_hinting"] = PropertyInfo(Variant::INT, "interface/editor/font_hinting", PROPERTY_HINT_ENUM, "Auto,None,Light,Normal", PROPERTY_USAGE_DEFAULT);
@@ -387,15 +408,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("filesystem/file_dialog/thumbnail_size", 64);
hints["filesystem/file_dialog/thumbnail_size"] = PropertyInfo(Variant::INT, "filesystem/file_dialog/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
- // Import
- _initial_set("filesystem/import/pvrtc_texture_tool", "");
-#ifdef WINDOWS_ENABLED
- hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "filesystem/import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "*.exe");
-#else
- hints["filesystem/import/pvrtc_texture_tool"] = PropertyInfo(Variant::STRING, "filesystem/import/pvrtc_texture_tool", PROPERTY_HINT_GLOBAL_FILE, "");
-#endif
- _initial_set("filesystem/import/pvrtc_fast_conversion", false);
-
/* Docks */
// SceneTree
@@ -1519,11 +1531,6 @@ Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path) {
return sc;
}
-struct ShortcutMapping {
- const char *path;
- uint32_t keycode;
-};
-
Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p_keycode) {
#ifdef OSX_ENABLED
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS