Package: pango

Function pango:shape-with-flags

Lambda List

pango:shape-with-flags (text paragraph analysis flags)

Arguments

text -- a string for the valid UTF-8 text to shape
paragraph -- a string for the text of the paragraph, may be nil
analysis -- a pango:analysis instance from the pango:itemize function
flags -- a pango:shape-flags value influencing the shaping process

Return Value

The 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-full function, except it also takes flags that can influence the shaping process.

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-with-flags function.
 

See also

2025-05-02