Skip to content

Commit

Permalink
Merge pull request #91974 from bruvzg/ts_notes
Browse files Browse the repository at this point in the history
[TextServer] Add notes about high level text/font classes and getting active server instance.
  • Loading branch information
akien-mga committed May 15, 2024
2 parents 693a13a + cfb9639 commit ce00392
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/classes/TextServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
</brief_description>
<description>
[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]
</description>
<tutorials>
</tutorials>
Expand Down

0 comments on commit ce00392

Please sign in to comment.