Enum Class BufferClusterLevel
- All Implemented Interfaces:
Serializable,Comparable<BufferClusterLevel>,Constable,Enumeration
In HBBUFFERCLUSTERLEVELMONOTONEGRAPHEMES, non-base
characters are merged into the cluster of the base character that precedes them.
There is also cluster merging every time the clusters will otherwise become non-monotone.
In HBBUFFERCLUSTERLEVELMONOTONECHARACTERS, non-base characters are initially
assigned their own cluster values, which are not merged into preceding base
clusters. This allows HarfBuzz to perform additional operations like reorder
sequences of adjacent marks. The output is still monotone, but the cluster
values are more granular.
In HBBUFFERCLUSTERLEVELCHARACTERS, non-base characters are assigned their
own cluster values, which are not merged into preceding base clusters. Moreover,
the cluster values are not merged into monotone order. This is the most granular
cluster level, and it is useful for clients that need to know the exact cluster
values of each character, but is harder to use for clients, since clusters
might appear in any order.
In HBBUFFERCLUSTERLEVELGRAPHEMES, non-base characters are merged into the
cluster of the base character that precedes them. This is similar to the Unicode
Grapheme Cluster algorithm, but it is not exactly the same. The output is
not forced to be monotone. This is useful for clients that want to use HarfBuzz
as a cheap implementation of the Unicode Grapheme Cluster algorithm.
HBBUFFERCLUSTERLEVELMONOTONEGRAPHEMES is the default, because it maintains
backward compatibility with older versions of HarfBuzz. New client programs that
do not need to maintain such backward compatibility are recommended to use
HBBUFFERCLUSTERLEVELMONOTONECHARACTERS instead of the default.
- Since:
- 0.9.42
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDon't group cluster values.Only group clusters, but don't enforce monotone order.Return cluster values grouped into monotone order.Return cluster values grouped by graphemes into monotone order. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BufferClusterLevelDefault cluster level, equal toHBBUFFERCLUSTERLEVELMONOTONEGRAPHEMES. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TypegetType()Get the GType of the BufferClusterLevel classintgetValue()Get the numeric value of this enumstatic BufferClusterLevelof(int value) Create a new BufferClusterLevel for the provided valuestatic BufferClusterLevelof(MemorySegment address) Create a new BufferClusterLevel for the value in the provided memory address.static BufferClusterLevelReturns the enum constant of this class with the specified name.static BufferClusterLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MONOTONE_GRAPHEMES
Return cluster values grouped by graphemes into monotone order. -
MONOTONE_CHARACTERS
Return cluster values grouped into monotone order. -
CHARACTERS
Don't group cluster values. -
GRAPHEMES
Only group clusters, but don't enforce monotone order.
-
-
Field Details
-
DEFAULT
Default cluster level, equal toHBBUFFERCLUSTERLEVELMONOTONEGRAPHEMES.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
of
Create a new BufferClusterLevel 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:
getValuein interfaceEnumeration- Returns:
- the enum value
-
of
Create a new BufferClusterLevel 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
Get the GType of the BufferClusterLevel class- Returns:
- the GType
-