Class TextServerManager
A singleton for managing TextServer implementations.
- Inheritance
-
TextServerManager
Remarks
TextServerManager is the API backend for loading, enumerating, and switching TextServers.
Note: Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so.
Methods
add_interface(TextServer)
Registers a TextServer interface.
void add_interface(TextServer interface)
Parameters
interface
TextServer
find_interface(String)
Qualifiers: const
Finds an interface by its name
.
TextServer find_interface(String name)
Parameters
name
String
get_interface(int)
Qualifiers: const
Returns the interface registered at a given index.
TextServer get_interface(int idx)
Parameters
idx
int
get_interface_count
Qualifiers: const
Returns the number of interfaces currently registered.
int get_interface_count
get_interfaces
Qualifiers: const
Returns a list of available interfaces, with the index and name of each interface.
Dictionary[] get_interfaces
get_primary_interface
Qualifiers: const
Returns the primary TextServer interface currently in use.
TextServer get_primary_interface
remove_interface(TextServer)
Removes an interface. All fonts and shaped text caches should be freed before removing an interface.
void remove_interface(TextServer interface)
Parameters
interface
TextServer
set_primary_interface(TextServer)
Sets the primary TextServer interface.
void set_primary_interface(TextServer index)
Parameters
index
TextServer
Events
interface_added(StringName)
Emitted when a new interface has been added.
signal interface_added(StringName interface_name)
Parameters
interface_name
StringName
interface_removed(StringName)
Emitted when an interface is removed.
signal interface_removed(StringName interface_name)
Parameters
interface_name
StringName