mpl.mathtext.Char

class mpl.mathtext.Char(c, state)[source]

Represents a single character. Unlike TeX, the font information and metrics are stored with each Char to make it easier to lookup the font metrics when needed. Note that TeX boxes have a width, height, and depth, unlike Type1 and Truetype which use a full bounding box and an advance in the x-direction. The metrics must be converted to the TeX way, and the advance (if different from width) must be converted into a Kern node when the Char is added to its parent Hlist.

__init__(c, state)[source]

Methods

__init__(c, state)
get_kerning(next) Return the amount of kerning between this and the given character.
grow()
is_slanted()
render(x, y) Render the character to the canvas
shrink()