Functions & Hooks

textToPath

function textToPath(text: string, style?: TextStyle): string;

The same layout as SVG path data, ready for <Path>: text you can stroke, dash, or feed to a path effect rather than only fill.

Relative to the first baseline at (0, 0) - the coordinates measureText reports - so translate it by the x/y you would have given <Text>. Empty for a face with no outlines, which is what a colour emoji is.

Parameters

text

string

style?

TextStyle = {}

Returns

string

On this page