def to_mask(self, texstr, dpi=<NUM_LIT>, fontsize=<NUM_LIT>):
assert(self._output=="<STR_LIT>")<EOL>prop = FontProperties(size=fontsize)<EOL>ftimage, depth = self.parse(texstr, dpi=dpi, prop=prop)<EOL>x = ftimage.as_array()<EOL>return x, depth<EOL>
*texstr*
    A valid mathtext string, eg r'IQ: $\sigma_i=15$'

*dpi*
    The dots-per-inch to render the text

*fontsize*
    The font size in points

Returns a tuple (*array*, *depth*)

  - *array* is an NxM uint8 alpha ubyte mask array of
    rasterized tex.

  - depth is the offset of the baseline from the bottom of the
    image in pixels.