From cfb9639fc3e9337b14e9b30b135f44edb6a700ea Mon Sep 17 00:00:00 2001
From: bruvzg <7645683+bruvzg@users.noreply.github.com>
Date: Wed, 15 May 2024 12:45:24 +0300
Subject: [PATCH] [TextServer] Add notes about high level text/font classes and
getting active server instance.
---
doc/classes/TextServer.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 7579a3938f7a..34137a18ef5c 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -5,6 +5,16 @@
[TextServer] is the API backend for managing fonts and rendering text.
+ [b]Note:[/b] This is a low-level API, consider using [TextLine], [TextParagraph], and [Font] classes instead.
+ This is an abstract class, so to get the currently active [TextServer] instance, use the following code:
+ [codeblocks]
+ [gdscript]
+ var ts = TextServerManager.get_primary_interface()
+ [/gdscript]
+ [csharp]
+ var ts = TextServerManager.GetPrimaryInterface();
+ [/csharp]
+ [/codeblocks]