bufferAddCodepoints

fnvoid bufferAddCodepoints(harfbuzz.buffer.Buffer buffer, harfbuzz.types.Codepoint[] text, uint itemOffset, int itemLength)

Appends characters from text array to buffer. The item_offset is the position of the first character from text that will be appended, and item_length is the number of character. When shaping part of a larger text (e.g. a run of text from a paragraph), instead of passing just the substring corresponding to the run, it is preferable to pass the whole paragraph and specify the run start and length as item_offset and item_length, respectively, to give HarfBuzz the full context to be able, for example, to do cross-run Arabic shaping or properly handle combining marks at stat of run.

This function does not check the validity of text, it is up to the caller to ensure it contains a valid Unicode scalar values. In contrast, [harfbuzz.global.bufferAddUtf32] can be used that takes similar input but performs sanity-check on the input.

Parameters

buffera #hb_buffer_t to append characters to.
textan array of Unicode code points to append.
itemOffsetthe offset of the first code point to add to the buffer.
itemLengththe number of code points to add to the buffer, or -1 for the end of text (assuming it is NULL terminated).