Package: cairo

Function cairo-show-text-glyphs

Lambda List

cairo-show-text-glyphs (cr utf8 len glyphs num-glyphs clusters num-clusters flags)

Arguments

cr -- a cairo-t context
utf8 -- a string of text encoded in UTF-8
len -- an integer with the length of utf8 in bytes, or -1 if it is NUL-terminated
glyphs -- array of cairo-glyph-t to show
num-glyphs -- an integer with the number of glyphs to show
clusters -- array of cairo-text-cluster-t cluster mapping information
num-clusters -- an integer with the number of clusters in the mapping
flags -- cairo-text-cluster-flags-t cluster mapping flags

Details

This operation has rendering effects similar to the cairo-show-glyphs function but, if the target surface supports it, uses the provided text and cluster mapping to embed the text for the glyphs shown in the output. If the target does not support the extended attributes, this function acts like the basic the cairo-show-glyphs function as if it had been passed glyphs and num-glyphs.

The mapping between UTF-8 and glyphs is provided by an array of clusters. Each cluster covers a number of text bytes and glyphs, and neighboring clusters cover neighboring areas of UTF-8 and glyphs. The clusters should collectively cover UTF-8 and glyphs in entirety.

The first cluster always covers bytes from the beginning of UTF-8. If flags do not have the :backward set, the first cluster also covers the beginning of glyphs, otherwise it covers the end of the glyphs array and following clusters move backward.

See the cairo-text-cluster-t structure for constraints on valid clusters.
 

See also

2021-12-12