def METHOD_NAME(self, document):
    height = document.height
    scale = document.scale
    svg = '<text '
    svg += f'font-size="{self.size * scale}px" '
    svg += f'font-family="{self.font_family}" '
    svg += f'text-anchor="{self.font_alignment}" '
    svg += f'font-weight="{self.weight}" '
    x = self.location[0] * scale
    y = height - self.location[1] * scale
    if self.angle != 0:
        svg += f'transform="translate({x},{y})rotate({self.angle})" '
    else:
        svg += f'x="{x}" '
        svg += f'y="{y}" '
    if self.attributes:
        svg += self.attributes.METHOD_NAME(document)
    svg += '>'
    svg += self.text
    svg += '</text>'
    return svg