Package: pango

Function pango:shape-full

Lambda List

pango:shape-full (text paragraph analysis)

Arguments

text -- a string with valid UTF-8 text to shape
paragraph -- a string with the text of the paragraph (see details), may be nil
analysis -- a pango:analysis instance from the pango:itemize function
glyphs -- a pango:glyph-string instance with the result

Details

Given a segment of text and the corresponding pango:analysis instance returned from the pango:itemize function, convert the characters into glyphs. You may also pass in only a substring of the item from the pango:itemize function.

This is similar to the pango:shape function, except it also can optionally take the full paragraph text as input, which will then be used to perform certain cross-item shaping interactions. If you have access to the broader text of which text is part of, provide the broader text as paragraph. If paragraph is nil, item text is used instead.

Note that the extra attributes in the analyis that is returned from the pango:itemize function have indices that are relative to the entire paragraph, so you do not pass the full paragraph text as paragraph, you need to subtract the item offset from their indices before calling the pango:shape-full function.
 

See also

2024-3-3