Skip to content

Commit ce00392

Browse files
committed
Merge pull request godotengine#91974 from bruvzg/ts_notes
[TextServer] Add notes about high level text/font classes and getting active server instance.
2 parents 693a13a + cfb9639 commit ce00392

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/classes/TextServer.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
</brief_description>
66
<description>
77
[TextServer] is the API backend for managing fonts and rendering text.
8+
[b]Note:[/b] This is a low-level API, consider using [TextLine], [TextParagraph], and [Font] classes instead.
9+
This is an abstract class, so to get the currently active [TextServer] instance, use the following code:
10+
[codeblocks]
11+
[gdscript]
12+
var ts = TextServerManager.get_primary_interface()
13+
[/gdscript]
14+
[csharp]
15+
var ts = TextServerManager.GetPrimaryInterface();
16+
[/csharp]
17+
[/codeblocks]
818
</description>
919
<tutorials>
1020
</tutorials>

0 commit comments

Comments
 (0)