summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2022-08-18 14:38:38 -0600
committerGitHub <noreply@github.com>2022-08-18 14:38:38 -0600
commit1811a4d78491c970f0d1c4ba424f681bd3bfa21c (patch)
treea03ffae1bdb8303df1ad3f6104d3ef3c29cb0803
parent0a313b4b8350f697b67c0d91c9f689942f0b5bb7 (diff)
parentf6417a4ead03025179675b74ccacd2deb16d9700 (diff)
Merge pull request #64356 from Calinou/editor-hide-dummy-text-driver
Hide Dummy text driver in the Project Settings as it makes editor unusable
-rw-r--r--doc/classes/ProjectSettings.xml6
-rw-r--r--main/main.cpp10
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index b0df71dced..680ddf341e 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -292,6 +292,8 @@
</member>
<member name="audio/driver/driver" type="String" setter="" getter="">
Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used.
+ The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] command line argument.
</member>
<member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false">
If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
@@ -867,6 +869,7 @@
</member>
<member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
Specifies the tablet driver to use. If left empty, the default driver will be used.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] command line argument.
</member>
<member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
Override for [member input_devices/pen_tablet/driver] on Windows.
@@ -930,6 +933,9 @@
</member>
<member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default="&quot;&quot;">
Specifies the [TextServer] to use. If left empty, the default will be used.
+ "ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] command line argument.
+ [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] command line argument.
</member>
<member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1".
diff --git a/main/main.cpp b/main/main.cpp
index 965fcc66c6..9e7d9e6f5a 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1997,10 +1997,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
GLOBAL_DEF_RST("internationalization/rendering/text_driver", "");
String text_driver_options;
for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
- if (i > 0) {
+ const String driver_name = TextServerManager::get_singleton()->get_interface(i)->get_name();
+ if (driver_name == "Dummy") {
+ // Dummy text driver cannot draw any text, making the editor unusable if selected.
+ continue;
+ }
+ if (!text_driver_options.is_empty() && text_driver_options.find(",") == -1) {
+ // Not the first option; add a comma before it as a separator for the property hint.
text_driver_options += ",";
}
- text_driver_options += TextServerManager::get_singleton()->get_interface(i)->get_name();
+ text_driver_options += driver_name;
}
ProjectSettings::get_singleton()->set_custom_property_info("internationalization/rendering/text_driver", PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options));