Package org.freedesktop.harfbuzz
Class Feature
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.Feature
- All Implemented Interfaces:
Proxy
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
ConstructorsConstructorDescriptionFeature()Allocate a new Feature.Allocate a new Feature.Feature(MemorySegment address) Create a Feature proxy instance for the provided memory address.Allocate a new Feature with the fields set to the provided values.Allocate a new Feature with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionvoidfeatureToString(@Nullable Out<String[]> buf) Converts ahb_feature_tinto aNULL-terminated string in the format understood by hb_feature_from_string().static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the Feature classintreadEnd()Read the value of the fieldend.intRead the value of the fieldstart.readTag()Read the value of the fieldtag.intRead the value of the fieldvalue.voidwriteEnd(int end) Write a value in the fieldend.voidwriteStart(int start) Write a value in the fieldstart.voidWrite a value in the fieldtag.voidwriteValue(int value) Write a value in the fieldvalue.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Feature
Create a Feature proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Feature
Allocate a new Feature.- Parameters:
arena- to control the memory allocation scope
-
Feature
public Feature()Allocate a new Feature. The memory is allocated withArena.ofAuto(). -
Feature
Allocate a new Feature with the fields set to the provided values.- Parameters:
tag- value for the fieldtagvalue- value for the fieldvaluestart- value for the fieldstartend- value for the fieldendarena- to control the memory allocation scope
-
Feature
Allocate a new Feature with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
tag- value for the fieldtagvalue- value for the fieldvaluestart- value for the fieldstartend- value for the fieldend
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readTag
-
writeTag
Write a value in the fieldtag.- Parameters:
tag- The new value for the fieldtag
-
readValue
public int readValue()Read the value of the fieldvalue.- Returns:
- The value of the field
value
-
writeValue
public void writeValue(int value) Write a value in the fieldvalue.- Parameters:
value- The new value for the fieldvalue
-
readStart
public int readStart()Read the value of the fieldstart.- Returns:
- The value of the field
start
-
writeStart
public void writeStart(int start) Write a value in the fieldstart.- Parameters:
start- The new value for the fieldstart
-
readEnd
public int readEnd()Read the value of the fieldend.- Returns:
- The value of the field
end
-
writeEnd
public void writeEnd(int end) Write a value in the fieldend.- Parameters:
end- The new value for the fieldend
-
featureToString
Converts ahb_feature_tinto aNULL-terminated string in the format understood by hb_feature_from_string(). The client in responsible for allocating big enough size forbuf,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
-