class_textserverdummy.rst 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextServerDummy.xml.
  6. .. _class_TextServerDummy:
  7. TextServerDummy
  8. ===============
  9. **Inherits:** :ref:`TextServerExtension<class_TextServerExtension>` **<** :ref:`TextServer<class_TextServer>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A dummy text server that can't render text or manage fonts.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A dummy :ref:`TextServer<class_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.
  15. A dummy text server is always available at the start of a project. Here's how to access it:
  16. ::
  17. var dummy_text_server = TextServerManager.find_interface("Dummy")
  18. if dummy_text_server != null:
  19. TextServerManager.set_primary_interface(dummy_text_server)
  20. # If the other text servers are unneeded, they can be removed:
  21. for i in TextServerManager.get_interface_count():
  22. var text_server = TextServerManager.get_interface(i)
  23. if text_server != dummy_text_server:
  24. TextServerManager.remove_interface(text_server)
  25. The command line argument ``--text-driver Dummy`` (case-sensitive) can be used to force the "Dummy" :ref:`TextServer<class_TextServer>` on any project.
  26. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  27. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  28. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  29. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  30. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  31. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  32. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  33. .. |void| replace:: :abbr:`void (No return value.)`