toyplot.text module

Functions for manipulating text.

class toyplot.text.Layout(style)[source]

Bases: object

Top-level container for one-or-more lines of text.

class toyplot.text.LineBox(style)[source]

Bases: object

Container for one line of text.

class toyplot.text.TextBox(text, style)[source]

Bases: object

Container for a block of text that shares a single style.

toyplot.text.dump(box, stream=None, level=0, indent=' ', recursive=True)[source]
toyplot.text.extents(text, angle, style)[source]

Compute canvas coordinate extents for a text string, based on the given angle and style.

toyplot.text.layout(text, style, fonts)[source]