Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# manimpango.MarkupUtils

class MarkupUtils

  Bases: `object`

  Methods

  `text2svg` | Render an SVG file from a `manim.mobject.svg.text_mobject.MarkupText` object.
  `validate` | Validates whether markup is a valid Markup and return the error's if any.

  static text2svg(text, font, slant, weight, size, _, disable_liga, file_name, START_X, START_Y, width, height, *, justify=None, indent=None, line_spacing=None, alignment=None, pango_width=None)

    Render an SVG file from a `manim.mobject.svg.text_mobject.MarkupText` object.

    Parameters:

      - text (str) –

      - font (str | None) –

      - slant (str) –

      - weight (str) –

      - size (float) –

      - disable_liga (bool) –

      - file_name (str) –

      - START_X (int) –

      - START_Y (int) –

      - width (int) –

      - height (int) –

      - justify (bool | None) –

      - indent (float | int | None) –

      - line_spacing (float | None) –

      - alignment (Alignment | None) –

      - pango_width (int | None) –

    Return type:

      str

  static validate(markup)

    Validates whether markup is a valid Markup and return the error’s if any.

    Parameters:

      markup (`str`) – The markup which should be checked.

    Returns:

      Returns empty string if markup is valid. If markup contains error it return the error message.

    Return type:

      `str`