freetypy.Outline.to_string

Outline.to_string()

⨎ Convert the outline to a text format string of commands. This function is flexible enough to create path commands for PDF, Postcript and SVG.

Parameters:

move_command : bytes

The character or command to use for “move to” commands.

line_command : bytes

The character or command to use for “line to” commands.

cubic_command : bytes

The character or command to use for “cubic curve” commands.

conic_command : bytes, optional

The character or command to use for “conic curve” commands. If one is not provided, conic curves will be implicitly converted to cubic curves.

Returns:

string : bytes

A text-based string of commands to render the character.

Examples

To generate a PDF-compatible path:

outline.to_string(" m ", " l ", " c ")