Enum Class TextSize

java.lang.Object
java.lang.Enum<TextSize>
io.github.chkrishnatej.rp3200.TextSize
All Implemented Interfaces:
Serializable, Comparable<TextSize>, Constable

public enum TextSize extends Enum<TextSize>
Character magnification (ESC/POS command GS ! n).

A WIDE or DOUBLE character takes two columns, so on 80 mm paper a line holds 24 such characters instead of 48. The builder takes this into account for separators, columns and EscPosBuilder.lineWidth().

Sizes and their template tags
ConstantWidth x heightTemplate tagChars per line (80 / 58 mm)
NORMAL1 x 1(default)48 / 32
TALL1 x 2[tall]48 / 32
WIDE2 x 1[wide]24 / 16
DOUBLE2 x 2[big]24 / 16
See Also:
  • Enum Constant Details

    • NORMAL

      public static final TextSize NORMAL
      Normal width and height.
    • TALL

      public static final TextSize TALL
      Double height, normal width - good for totals without losing line width.
    • WIDE

      public static final TextSize WIDE
      Double width, normal height.
    • DOUBLE

      public static final TextSize DOUBLE
      Double width and double height - typical for the shop name.
  • Method Details

    • values

      public static TextSize[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TextSize valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null