Cluster

Inheritance: java.lang.Object

public class Cluster

Encapsulates code points and glyphs composing a grapheme.

Constructors

ConstructorDescription
Cluster(int[] codepoints, Glyph[] glyphs)Initializes new instance of this class.

Methods

MethodDescription
deepClone()Returns a deep clone of this instance.
getCodepoints()Gets codepoints of the cluster.
getCodepointsLength()Gets total number of codepoints in the Cluster.
getGlyphs()Gets glyphs of the cluster.
getString()Creates java.lang.String using codepoints from this cluster.
getString(Cluster[] clusters)Creates java.lang.String using codepoints from the specified clusters.
getWidth(int em, float fontSize)Returns width of the cluster.

Cluster(int[] codepoints, Glyph[] glyphs)

public Cluster(int[] codepoints, Glyph[] glyphs)

Initializes new instance of this class.

Parameters:

ParameterTypeDescription
codepointsint[]Array of Unicode points composing a grapheme.
glyphsGlyph[]Array of Glyph > composing a grapheme.

deepClone()

public Cluster deepClone()

Returns a deep clone of this instance.

Returns: Cluster

getCodepoints()

public int[] getCodepoints()

Gets codepoints of the cluster.

Returns: int[] - Codepoints of the cluster.

getCodepointsLength()

public int getCodepointsLength()

Gets total number of codepoints in the Cluster.

Returns: int - Total number of codepoints in the Cluster.

getGlyphs()

public Glyph[] getGlyphs()

Gets glyphs of the cluster.

Returns: com.aspose.words.Glyph[] - Glyphs of the cluster.

getString()

public String getString()

Creates java.lang.String using codepoints from this cluster.

Returns: java.lang.String

getString(Cluster[] clusters)

public static String getString(Cluster[] clusters)

Creates java.lang.String using codepoints from the specified clusters.

Parameters:

ParameterTypeDescription
clustersCluster[]

Returns: java.lang.String

getWidth(int em, float fontSize)

public float getWidth(int em, float fontSize)

Returns width of the cluster.

Parameters:

ParameterTypeDescription
emint
fontSizefloat

Returns: float