Class Styles

java.lang.Object
com.github.tommyettinger.textra.Styles

public final class Styles extends Object
An outer class that holds all styles for TextraTypist widgets. These are each named to match a scene2d.ui style, such as Styles.LabelStyle matching Label.LabelStyle. These styles are typically loaded from a skin JSON file using FWSkin or one of its subclasses, but can also be created on their own. When reading in a skin JSON file, no changes need to be made for TextraTypist styles if using FWSkin to load in the JSON.
Since TextraTypist version 2.1.0, any style constructors that take and copy BitmapFont or scene2d.ui styles that contain one or more BitmapFonts are deprecated and are intended to be removed. These constructors have a tendency to be called many times (often once per label, which can happen many times in some widgets), allocating a Font every time by copying data from the given BitmapFont. It is not at all easy to dispose these Font objects, especially if they share information with a currently-used BitmapFont, and the Font instances can overwhelm the memory available to an app over not very much time.