Function

HarfBuzz-0.0HarfBuzzbuffer_add_codepointsSince 0.9.31

  • 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, hb_buffer_add_utf32() can be used that takes similar input but performs sanity-check on the input.

    Parameters

    • buffer: buffer_t

      a HarfBuzz.buffer_t to append characters to.

    • text: number[]

      an array of Unicode code points to append.

    • item_offset: number

      the offset of the first code point to add to the buffer.

    • item_length: number

      the number of code points to add to the buffer, or -1 for the end of text (assuming it is NULL terminated).

    Returns void

    0.9.31