```{index} single: text_to_glyphs (Cairo::ScaledFont) ``` ```{index} single: Cairo::ScaledFont::text_to_glyphs ``` # text_to_glyphs Converts a string into the glyphs this font would use to draw it, laid out starting at `($x, $y)`: `$sf->text_to_glyphs($x, $y, $utf8)`. Returns a **list**: `($status, $glyphs, $clusters, $cluster_flags)`. The status nickname is always returned; the other three come back only when it is `success`, so check the status before using them. `$glyphs` is an arrayref of `{index, x, y}` hashrefs, `$clusters` an arrayref of `{num_bytes, num_glyphs}` hashrefs mapping the text to those glyphs, and `$cluster_flags` an arrayref of set flag names (`backward`, or empty). All three arguments are required; a shorter list croaks with a usage message. Needs libcairo 1.8 or newer.