def font(self, fontpath=None, fontsize=None):
if fontpath is not None:<EOL><INDENT>self._canvas.fontfile = fontpath<EOL><DEDENT>else:<EOL><INDENT>return self._canvas.fontfile<EOL><DEDENT>if fontsize is not None:<EOL><INDENT>self._canvas.fontsize = fontsize<EOL><DEDENT>
Set the font to be used with new text instances.

        :param fontpath: path to truetype or opentype font.
        :param fontsize: size of font

        :return: current current fontpath (if fontpath param not set)
        Accepts TrueType and OpenType files. Depends on FreeType being
        installed.