Skip to content

TextSystemManager

Inherits: Object

A singleton for managing TextSystem implementations.

TextSystemManager is the API backend for loading, enumerating, and switching TextSystems.

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.

Returns Method
void add_interface(interface: TextSystem)
TextSystem find_interface(name: String) const
TextSystem get_interface(idx: int) const
int get_interface_count() const
Array[Dictionary] get_interfaces() const
TextSystem get_primary_interface() const
void remove_interface(interface: TextSystem)
void set_primary_interface(index: TextSystem)

interface_added

interface_added(interface_name: StringName)

Emitted when a new interface has been added.

interface_removed

interface_removed(interface_name: StringName)

Emitted when an interface is removed.

add_interface

void add_interface(interface: TextSystem)

Registers a TextSystem interface.

find_interface

TextSystem find_interface(name: String) const

Finds an interface by its name.

get_interface

TextSystem get_interface(idx: int) const

Returns the interface registered at a given index.

get_interface_count

int get_interface_count() const

Returns the number of interfaces currently registered.

get_interfaces

Array[Dictionary] get_interfaces() const

Returns a list of available interfaces, with the index and name of each interface.

get_primary_interface

TextSystem get_primary_interface() const

Returns the primary TextSystem interface currently in use.

remove_interface

void remove_interface(interface: TextSystem)

Removes an interface. All fonts and shaped text caches should be freed before removing an interface.

set_primary_interface

void set_primary_interface(index: TextSystem)

Sets the primary TextSystem interface.