[pango.item.Item] structures. The items should be freed using [pango.item.Item.free] in combination with [glib.list.List.freeFull].
itemize
fn
pango.item.Item[] itemize(pango.context.Context context, string text, int startIndex, int length, pango.attr_list.AttrList attrs, pango.attr_iterator.AttrIterator cachedIter = null)Breaks a piece of text into segments with consistent directional level and font.
Each byte of text will be contained in exactly one of the items in the returned list; the generated list of items will be in logical order (the start offsets of the items are ascending).
cached_iter should be an iterator over attrs currently positioned at a range before or containing start_index; cached_iter will be advanced to the range covering the position just after start_index + length. (i.e. if itemizing in a loop, just keep passing in the same cached_iter).
Parameters
context | a structure holding information that affects the itemization process. |
text | the text to itemize. Must be valid UTF-8 |
startIndex | first byte in text to process |
length | the number of bytes (not characters) to process after start_index. This must be >= 0. |
attrs | the set of attributes that apply to text. |
cachedIter | Cached attribute iterator |
Returns
a [glib.list.List] of