shapeItem

fun shapeItem(item: Item, paragraphText: String? = null, paragraphLength: Int, logAttrs: LogAttr? = null, glyphs: GlyphString, flags: ShapeFlags)

Convert the characters in @item into glyphs.

This is similar to func@Pango.shape_with_flags, except it takes a PangoItem instead of separate @item_text and @analysis arguments. It also takes @log_attrs, which may be used in implementing text transforms.

Note that the extra attributes in the @analyis that is returned from func@Pango.itemize have indices that are relative to the entire paragraph, so you do not pass the full paragraph text as @paragraph_text, you need to subtract the item offset from their indices before calling func@Pango.shape_with_flags.

Since

1.50

Parameters

item

PangoItem to shape

paragraphText

text of the paragraph (see details).

paragraphLength

the length (in bytes) of @paragraph_text. -1 means nul-terminated text.

logAttrs

array of PangoLogAttr for @item

glyphs

glyph string in which to store results

flags

flags influencing the shaping process