Class hb_font_extents_t

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class hb_font_extents_t extends Struct<hb_font_extents_t> implements NativeResource

 struct hb_font_extents_t {
     hb_position_t ascender;
     hb_position_t descender;
     hb_position_t line_gap;
     hb_position_t reserved9;
     hb_position_t reserved8;
     hb_position_t reserved7;
     hb_position_t reserved6;
     hb_position_t reserved5;
     hb_position_t reserved4;
     hb_position_t reserved3;
     hb_position_t reserved2;
     hb_position_t reserved1;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • ASCENDER

      public static final int ASCENDER
      The struct member offsets.
    • DESCENDER

      public static final int DESCENDER
      The struct member offsets.
    • LINE_GAP

      public static final int LINE_GAP
      The struct member offsets.
    • RESERVED9

      public static final int RESERVED9
      The struct member offsets.
    • RESERVED8

      public static final int RESERVED8
      The struct member offsets.
    • RESERVED7

      public static final int RESERVED7
      The struct member offsets.
    • RESERVED6

      public static final int RESERVED6
      The struct member offsets.
    • RESERVED5

      public static final int RESERVED5
      The struct member offsets.
    • RESERVED4

      public static final int RESERVED4
      The struct member offsets.
    • RESERVED3

      public static final int RESERVED3
      The struct member offsets.
    • RESERVED2

      public static final int RESERVED2
      The struct member offsets.
    • RESERVED1

      public static final int RESERVED1
      The struct member offsets.
  • Constructor Details

    • hb_font_extents_t

      public hb_font_extents_t(ByteBuffer container)
      Creates a hb_font_extents_t instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<hb_font_extents_t>
    • ascender

      public int ascender()
      Returns:
      the value of the ascender field.
    • descender

      public int descender()
      Returns:
      the value of the descender field.
    • line_gap

      public int line_gap()
      Returns:
      the value of the line_gap field.
    • ascender

      public hb_font_extents_t ascender(int value)
      Sets the specified value to the ascender field.
    • descender

      public hb_font_extents_t descender(int value)
      Sets the specified value to the descender field.
    • line_gap

      public hb_font_extents_t line_gap(int value)
      Sets the specified value to the line_gap field.
    • set

      public hb_font_extents_t set(int ascender, int descender, int line_gap)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static hb_font_extents_t malloc()
      Returns a new hb_font_extents_t instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static hb_font_extents_t calloc()
      Returns a new hb_font_extents_t instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static hb_font_extents_t create()
      Returns a new hb_font_extents_t instance allocated with BufferUtils.
    • create

      public static hb_font_extents_t create(long address)
      Returns a new hb_font_extents_t instance for the specified memory address.
    • createSafe

      public static @Nullable hb_font_extents_t createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static hb_font_extents_t.Buffer malloc(int capacity)
      Returns a new hb_font_extents_t.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static hb_font_extents_t.Buffer calloc(int capacity)
      Returns a new hb_font_extents_t.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static hb_font_extents_t.Buffer create(int capacity)
      Returns a new hb_font_extents_t.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static hb_font_extents_t.Buffer create(long address, int capacity)
      Create a hb_font_extents_t.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable hb_font_extents_t.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static hb_font_extents_t malloc(MemoryStack stack)
      Returns a new hb_font_extents_t instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static hb_font_extents_t calloc(MemoryStack stack)
      Returns a new hb_font_extents_t instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static hb_font_extents_t.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new hb_font_extents_t.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static hb_font_extents_t.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new hb_font_extents_t.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nascender

      public static int nascender(long struct)
      Unsafe version of ascender().
    • ndescender

      public static int ndescender(long struct)
      Unsafe version of descender().
    • nline_gap

      public static int nline_gap(long struct)
      Unsafe version of line_gap().
    • nreserved9

      public static int nreserved9(long struct)
    • nreserved8

      public static int nreserved8(long struct)
    • nreserved7

      public static int nreserved7(long struct)
    • nreserved6

      public static int nreserved6(long struct)
    • nreserved5

      public static int nreserved5(long struct)
    • nreserved4

      public static int nreserved4(long struct)
    • nreserved3

      public static int nreserved3(long struct)
    • nreserved2

      public static int nreserved2(long struct)
    • nreserved1

      public static int nreserved1(long struct)
    • nascender

      public static void nascender(long struct, int value)
      Unsafe version of ascender.
    • ndescender

      public static void ndescender(long struct, int value)
      Unsafe version of descender.
    • nline_gap

      public static void nline_gap(long struct, int value)
      Unsafe version of line_gap.
    • nreserved9

      public static void nreserved9(long struct, int value)
    • nreserved8

      public static void nreserved8(long struct, int value)
    • nreserved7

      public static void nreserved7(long struct, int value)
    • nreserved6

      public static void nreserved6(long struct, int value)
    • nreserved5

      public static void nreserved5(long struct, int value)
    • nreserved4

      public static void nreserved4(long struct, int value)
    • nreserved3

      public static void nreserved3(long struct, int value)
    • nreserved2

      public static void nreserved2(long struct, int value)
    • nreserved1

      public static void nreserved1(long struct, int value)