Appends a character with the Unicode value of codePoint to the buffer,
and gives it the initial cluster value of cluster. Clusters can be any
thing the client wants, they are usually used to refer to the index of the
character in the input text stream and are output in the cluster field
of GlyphInfo.
This function does not check the validity of codePoint, it is up to the
caller to ensure it is a valid Unicode code point.
A Unicode code point.
The cluster value of codePoint.
Add code points to the buffer.
Array of code points to be added to the buffer.
The offset of the first code point to add to the buffer.
OptionalitemLength: numberThe number of code points to add to the buffer, or omit for the end of the array.
Add text to the buffer.
Text to be added to the buffer.
The offset of the first character to add to the buffer.
OptionalitemLength: numberThe number of characters to add to the buffer, or omit for the end of text.
Similar to reset(), but does not clear the Unicode functions and the replacement code point.
Return the buffer content type.
The buffer content type as a BufferContentType value.
Get the glyph information and positions from the buffer.
The glyph information and positions.
The glyph information is returned as an array of objects with the properties from getGlyphInfos and getGlyphPositions combined.
Get the the number of items in the buffer.
The buffer length.
Set buffer script, language and direction.
This needs to be done before shaping.
Reset the buffer to its initial status.
Serialize the buffer contents to a string.
Serialization options:
font: the font to use for serialization;start: the starting index of the glyphs (default 0);end: the ending index of the glyphs (default end of buffer);format: a BufferSerializeFormat value (default TEXT);flags: a combination of BufferSerializeFlag values (default 0).The serialized buffer contents.
Set the HarfBuzz clustering level.
Affects the cluster values returned from shaping.
A ClusterLevel value. See the HarfBuzz manual chapter on Clusters.
Set buffer flags explicitly.
A combination of BufferFlag values (OR them together).
Set buffer language explicitly.
The buffer language
Set buffer script explicitly.
The buffer script
Update the glyph positions in the buffer. WARNING: Do not use unless you know what you are doing.
An object representing a HarfBuzz buffer. A buffer holds the input text and its properties before shaping, and the output glyphs and their information after shaping.