def from_text(
        cls,
        text,
        font_height=ENC_SANS_BOLD_FONT_HEIGHT,
        font_path=ENC_SANS_BOLD_FONT_PATH,
        foreground_color=BUTTON_FG,
        background_color=BUTTON_BG,
        antialiased=True,
        padding=0,
        depth_finish_thickness=0,
        depth_finish_outset=True,
        border_thickness=0,
        border_color=BUTTON_FG,
        max_width=0,
        ommit_direction="right",
        command=empty_function,
        coordinates_name="topleft",
        coordinates_value=(0, 0),
        **kwargs,
    ):
        """Create surface from text args and pass to class.

        text (string)
            text to be rendered as the button surface.
        font_height (positive integer)
            height of the text surface in pixels.
        font_path (string)
            represents the font used. Check local font.py
            module to see available values. In doubt, use
            'default' for the default font.
        foreground_color
            A tuple or list of r, g, b values which are
            integers ranging from 0 to 255.

        For definitions of the remaining parameters,
        please check the __init__ method.
        """
        surface = render_text(
            text=text,
            font_height=font_height,
            font_path=font_path,
            foreground_color=foreground_color,
            background_color=background_color,
            antialiased=antialiased,
            padding=padding,
            depth_finish_thickness=depth_finish_thickness,
            depth_finish_outset=depth_finish_outset,
            border_thickness=border_thickness,
            border_color=border_color,
            max_width=max_width,
            ommit_direction=ommit_direction,
        )

        return cls(
            surface,
            command=command,
            coordinates_name=coordinates_name,
            coordinates_value=coordinates_value,
            **kwargs,
        )
Create surface from text args and pass to class.

        text (string)
            text to be rendered as the button surface.
        font_height (positive integer)
            height of the text surface in pixels.
        font_path (string)
            represents the font used. Check local font.py
            module to see available values. In doubt, use
            'default' for the default font.
        foreground_color
            A tuple or list of r, g, b values which are
            integers ranging from 0 to 255.

        For definitions of the remaining parameters,
        please check the __init__ method.
        
nodezator/our3rdlibs/button.py