def METHOD_NAME(self):
    t = QGraphicsTextItem()
    t.setDefaultTextColor(QColor(self.color.hexcolor))
    if self.html:
        text = self.text.replace(u'\n', u'<br />')
        t.setHtml(
            u'<div align="center">%s</div>' % text
            if self.center else text
        )
    else:
        t.setPlainText(self.text)
    mw = self.max_width
    if mw is None:
        mw = self._canvas.width // 2 - self.x
    if self.center:
        mw *= 2
    t.setTextWidth(mw)
    # Register custom fonts that are placed in the file pool
    self._register_custom_font(self.font_family)
    f = QFont(
        self.font_family,
        weight=QFont.Bold if self.font_bold else QFont.Normal,
        italic=self.font_italic
    )
    for family, substitute in font_substitutions:
        f.insertSubstitution(substitute, family)
    f.setPixelSize(self.font_size)
    t.setFont(f)
    return t