Class Feature

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.Feature
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Feature extends ProxyInstance
The hb_feature_t is the structure that holds information about requested feature application. The feature will be applied with the given value to all glyphs which are in clusters between start (inclusive) and end (exclusive). Setting start to HB_FEATURE_GLOBAL_START and end to HB_FEATURE_GLOBAL_END specifies that the feature always applies to the entire buffer.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Allocate a new Feature.
    Feature(Arena arena)
    Allocate a new Feature.
    Create a Feature proxy instance for the provided memory address.
    Feature(Tag tag, int value, int start, int end)
    Allocate a new Feature with the fields set to the provided values.
    Feature(Tag tag, int value, int start, int end, Arena arena)
    Allocate a new Feature with the fields set to the provided values.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    featureToString(@Nullable Out<String[]> buf)
    Converts a hb_feature_t into a NULL-terminated string in the format understood by hb_feature_from_string().
    The memory layout of the native struct.
    static @Nullable Type
    Get the GType of the Feature class.
    int
    Read the value of the field end.
    int
    Read the value of the field start.
    Read the value of the field tag.
    int
    Read the value of the field value.
    void
    writeEnd(int end)
    Write a value in the field end.
    void
    writeStart(int start)
    Write a value in the field start.
    void
    Write a value in the field tag.
    void
    writeValue(int value)
    Write a value in the field value.

    Methods inherited from class ProxyInstance

    equals, handle, hashCode

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Feature

      public Feature(MemorySegment address)
      Create a Feature proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Feature

      public Feature(Arena arena)
      Allocate a new Feature.
      Parameters:
      arena - to control the memory allocation scope
    • Feature

      public Feature()
      Allocate a new Feature. The memory is allocated with Arena.ofAuto().
    • Feature

      public Feature(Tag tag, int value, int start, int end, Arena arena)
      Allocate a new Feature with the fields set to the provided values.
      Parameters:
      tag - value for the field tag
      value - value for the field value
      start - value for the field start
      end - value for the field end
      arena - to control the memory allocation scope
    • Feature

      public Feature(Tag tag, int value, int start, int end)
      Allocate a new Feature with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      tag - value for the field tag
      value - value for the field value
      start - value for the field start
      end - value for the field end
  • Method Details

    • getType

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

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readTag

      public Tag readTag()
      Read the value of the field tag.
      Returns:
      The value of the field tag
    • writeTag

      public void writeTag(Tag tag)
      Write a value in the field tag.
      Parameters:
      tag - The new value for the field tag
    • readValue

      public int readValue()
      Read the value of the field value.
      Returns:
      The value of the field value
    • writeValue

      public void writeValue(int value)
      Write a value in the field value.
      Parameters:
      value - The new value for the field value
    • readStart

      public int readStart()
      Read the value of the field start.
      Returns:
      The value of the field start
    • writeStart

      public void writeStart(int start)
      Write a value in the field start.
      Parameters:
      start - The new value for the field start
    • readEnd

      public int readEnd()
      Read the value of the field end.
      Returns:
      The value of the field end
    • writeEnd

      public void writeEnd(int end)
      Write a value in the field end.
      Parameters:
      end - The new value for the field end
    • featureToString

      public void featureToString(@Nullable Out<String[]> buf)

      Converts a hb_feature_t into a NULL-terminated string in the format understood by hb_feature_from_string(). The client in responsible for allocating big enough size for buf, 128 bytes is more than enough.

      Note that the feature value will be omitted if it is '1', but the string won't include any whitespace.

      Parameters:
      buf - output string
      Since:
      0.9.5