Context.showTextGlyphs
void showTextGlyphs(string utf8, cairo.glyph.Glyph glyphs, int numGlyphs, cairo.text_cluster.TextCluster clusters, int numClusters, cairo.types.TextClusterFlags clusterFlags)This operation has rendering effects similar to [cairo.context.Context.showGlyphs] 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 [cairo.context.Context.showGlyphs] as if it had been passed glyphs and num_glyphs.
The mapping between utf8 and glyphs is provided by an array of
<firstterm>clusters</firstterm>. Each cluster covers a number oftext bytes and glyphs, and neighboring clusters cover neighboring areas of utf8 and glyphs. The clusters should collectively cover utf8 and glyphs in entirety.
The first cluster always covers bytes from the beginning of utf8. If cluster_flags do not have the [cairo.types.TextClusterFlags.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 #cairo_text_cluster_t for constraints on valid clusters.
Parameters
utf8 | a string of text encoded in UTF-8 |
glyphs | array of glyphs to show |
numGlyphs | number of glyphs to show |
clusters | array of cluster mapping information |
numClusters | number of clusters in the mapping |
clusterFlags | cluster mapping flags |