KetraTerm
API · v0.3.0All versions

writeCluster

abstract fun writeCluster(codepoints: IntArray, length: Int = codepoints.size)

Writes one pre-segmented grapheme cluster to the grid.

This is the parser-facing ingress for complex printable sequences such as combining-mark clusters, ZWJ emoji, and variation-selector sequences. The core computes the final display width from its active width policy, including East Asian ambiguous-width mode.

Parameters

codepoints

Codepoints that make up the grapheme cluster.

length

Number of valid codepoints in codepoints.

Throws

if length is outside 1..codepoints.size or any value in the used prefix is not a Unicode scalar. The entire prefix is checked before mutation; unused array entries are ignored.