Skip to content

TextraTypist Playground

raeleus edited this page May 14, 2022 · 35 revisions

TextraTypist is an advanced text rendering library created by Tommy Ettinger to be used with Scene2D. This enables the ability to mark text with font effects like bold, italics, and underlining. See TextraLabel as a replacement for Label. The library also includes a modified version of Rafa's TypingLabel for many typing effects.

TextraTypist Playground is a module of Skin Composer used to help construct the markup necessary for rendering a TextraLabel or TypingLabel. By following this guide, you will be able to use the utility to type your text, apply formatting, and then copy the resulting code to your own project.

Preparation

Using the latest version of Skin Composer, create a new project or open an existing one. If you wish to use your own fonts with TextraTypist, go to Project >> Fonts and create the fonts that you want to use. Note that TextraTypist only allows for up to 15 fonts in a single family, so Playground will only recognize the first 15 that you have created. These can be Bitmap or FreeType fonts.

To implement TextraTypist in your own libGDX project, follow the setup guide on GitHub. Create a TypingLabel and implement it in your UI layout. The text you create in Playground will be copied and pasted into these labels.

Creating Text

To begin, go to Project >> TextraTypist Playground. You will be prompted to choose a Standard Font Family or a Skin Font Family. The font family controls what fonts you will have available to you when you use Playground and indicate which fonts are going to be used in the Label.

  • Standard Font Family allows you to use the fonts bundled with TextraTypist. These are always available and easiest to implement. There are more font families available including distance field fonts, however these have been omitted from Playground for ease of use. It is an exercise for the user to implement these.

  • Skin Font Family is a family created from the fonts in your Skin Composer skin. The names that you have defined your fonts with will be used in the program. You must construct the font family in your project code in order for these names to work correctly in your game.

You will come to the "Home" screen of the TextraTypist Playground.

The menu buttons allow you to navigate through the different screens.

The Formatting Bar contains all the functions available for applying effects and formatting to your text.

The Code text area allows you to type your text and modify the formatting tags on the fly.

The Preview label shows you a live preview of the TypingLabel. It is updated automatically and repeats the animation with every new key stroke in the Code text area.

Clone this wiki locally