Up to date

This page is up to date for Godot 4.1. If you still find outdated information, please open an issue.

TextServerDummy

Inherits: TextServerExtension < TextServer < RefCounted < Object

A dummy text server that can’t render text or manage fonts.

Description

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:

  1. var dummy_text_server = TextServerManager.find_interface("Dummy")
  2. if dummy_text_server != null:
  3. TextServerManager.set_primary_interface(dummy_text_server)
  4. # If the other text servers are unneeded, they can be removed:
  5. for i in TextServerManager.get_interface_count():
  6. var text_server = TextServerManager.get_interface(i)
  7. if text_server != dummy_text_server:
  8. TextServerManager.remove_interface(text_server)

The command line argument --text-driver Dummy (case-sensitive) can be used to force the “Dummy” TextServer on any project.