show_text_glyphs#
Draws positioned glyphs while also recording which characters of $text they came from, so that backends such as PDF and SVG can make the result selectable and searchable.
$cr->show_text_glyphs($text, @glyphs, @clusters, [‘backward’]);
\@glyphs holds { index, x, y } hash references as for show_glyphs. \@clusters holds { num_bytes, num_glyphs } hash references, each mapping that many bytes of $text onto that many glyphs; the clusters must together account for the whole string and the whole glyph list. $cluster_flags is an array reference of flag names (only 'backward' is defined), a single flag name, or undef for none. Note that unlike the glyph and cluster lists, which are passed by reference, show_glyphs takes its glyphs as a flat list. Returns nothing. Needs cairo 1.8 or newer; on an older library the call dies saying so. Wraps cairo_show_text_glyphs.