From e530168fb85f00d0fcd44b4a3c4f74714d1c5dfa Mon Sep 17 00:00:00 2001 From: VolTer Date: Wed, 3 May 2023 15:41:29 +0200 Subject: Document TextServerDummy (cherry picked from commit c8e06fe83857ddcda20796fc8ad028f576722904) --- doc/classes/TextServerDummy.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/classes/TextServerDummy.xml b/doc/classes/TextServerDummy.xml index b872e93fd6..7bf8738499 100644 --- a/doc/classes/TextServerDummy.xml +++ b/doc/classes/TextServerDummy.xml @@ -1,8 +1,22 @@ + A dummy text server that can't render text or manage fonts. + A dummy [TextServer] interface that doesn't do anything. Useful for freeing up memory when rendering text is not needed, as text servers are resource-intensive. It can also be used for performance comparisons in complex GUIs to check the impact of text rendering. + A dummy text server is always available at the start of a project. Here's how to access it: + [codeblock] + var dummy_text_server = TextServerManager.find_interface("Dummy") + if dummy_text_server != null: + TextServerManager.set_primary_interface(dummy_text_server) + # If the other text servers are unneeded, they can be removed: + for i in TextServerManager.get_interface_count(): + var text_server = TextServerManager.get_interface(i) + if text_server != dummy_text_server: + TextServerManager.remove_interface(text_server) + [/codeblock] + The command line argument [code]--text-driver Dummy[/code] (case-sensitive) can be used to force the "Dummy" [TextServer] on any project. -- cgit v1.2.3