Class FT_SfntName

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_SfntName extends Struct<FT_SfntName> implements NativeResource

 struct FT_SfntName {
     FT_UShort platform_id;
     FT_UShort encoding_id;
     FT_UShort language_id;
     FT_UShort name_id;
     FT_Byte * string;
     FT_UInt string_len;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int PLATFORM_ID
      The struct member offsets.
    • ENCODING_ID

      public static final int ENCODING_ID
      The struct member offsets.
    • LANGUAGE_ID

      public static final int LANGUAGE_ID
      The struct member offsets.
    • NAME_ID

      public static final int NAME_ID
      The struct member offsets.
    • STRING

      public static final int STRING
      The struct member offsets.
    • STRING_LEN

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

    • FT_SfntName

      public FT_SfntName(ByteBuffer container)
      Creates a FT_SfntName 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<FT_SfntName>
    • platform_id

      public short platform_id()
      Returns:
      the value of the platform_id field.
    • encoding_id

      public short encoding_id()
      Returns:
      the value of the encoding_id field.
    • language_id

      public short language_id()
      Returns:
      the value of the language_id field.
    • name_id

      public short name_id()
      Returns:
      the value of the name_id field.
    • string

      public ByteBuffer string()
      Returns:
      a ByteBuffer view of the data pointed to by the string field.
    • string_len

      public int string_len()
      Returns:
      the value of the string_len field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static FT_SfntName.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_SfntName.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
    • nplatform_id

      public static short nplatform_id(long struct)
      Unsafe version of platform_id().
    • nencoding_id

      public static short nencoding_id(long struct)
      Unsafe version of encoding_id().
    • nlanguage_id

      public static short nlanguage_id(long struct)
      Unsafe version of language_id().
    • nname_id

      public static short nname_id(long struct)
      Unsafe version of name_id().
    • nstring

      public static ByteBuffer nstring(long struct)
      Unsafe version of string.
    • nstring_len

      public static int nstring_len(long struct)
      Unsafe version of string_len().