Enum Class Weight

java.lang.Object
java.lang.Enum<Weight>
org.gnome.pango.Weight
All Implemented Interfaces:
Serializable, Comparable<Weight>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum Weight extends Enum<Weight> implements Enumeration

An enumeration specifying the weight (boldness) of a font.

Weight is specified as a numeric value ranging from 100 to 1000. This enumeration simply provides some common, predefined values.

  • Enum Constant Details

    • THIN

      public static final Weight THIN
      the thin weight (= 100) Since: 1.24
    • ULTRALIGHT

      public static final Weight ULTRALIGHT
      the ultralight weight (= 200)
    • LIGHT

      public static final Weight LIGHT
      the light weight (= 300)
    • SEMILIGHT

      public static final Weight SEMILIGHT
      the semilight weight (= 350) Since: 1.36.7
    • BOOK

      public static final Weight BOOK
      the book weight (= 380) Since: 1.24)
    • NORMAL

      public static final Weight NORMAL
      the default weight (= 400)
    • MEDIUM

      public static final Weight MEDIUM
      the medium weight (= 500) Since: 1.24
    • SEMIBOLD

      public static final Weight SEMIBOLD
      the semibold weight (= 600)
    • BOLD

      public static final Weight BOLD
      the bold weight (= 700)
    • ULTRABOLD

      public static final Weight ULTRABOLD
      the ultrabold weight (= 800)
    • HEAVY

      public static final Weight HEAVY
      the heavy weight (= 900)
    • ULTRAHEAVY

      public static final Weight ULTRAHEAVY
      the ultraheavy weight (= 1000) Since: 1.24
  • Method Details

    • values

      public static Weight[] 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 Weight 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
    • of

      public static Weight of(int value)
      Create a new Weight for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Weight of(MemorySegment address)
      Create a new Weight for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the Weight class.
      Returns:
      the GType