Class TextStyle

java.lang.Object
lol.trq.helios.text.TextStyle

public final class TextStyle extends Object
How text is drawn: font, size, colour, shadow, weight, spacing and whether ยง formatting codes apply. Immutable; build one with builder(MsdfFont) and reuse it.
  • Method Details

    • builder

      public static TextStyle.Builder builder(MsdfFont font)
      Starts a style.
      Parameters:
      font - the font
      Returns:
      a builder with size 9, white, no shadow, regular weight and formatting codes on
    • font

      public MsdfFont font()
      Returns the font.
      Returns:
      the font
    • size

      public float size()
      Returns the size: the em height in drawing units.
      Returns:
      the size
    • lineHeight

      public float lineHeight()
      Returns the distance from one baseline to the next in drawing units.
      Returns:
      the line height