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 (unicode) –

  • font (unicode) –

  • slant (unicode) –

  • weight (unicode) –

  • size (int) –

  • _ (int) –

  • disable_liga (bool) –

  • file_name (unicode) –

  • START_X (int) –

  • START_Y (int) –

  • width (int) –

  • height (int) –

  • justify (bool) –

  • indent (float) –

  • line_spacing (float) –

  • alignment (manimpango.enums.Alignment) –

  • pango_width (Optional[int]) –

Return type

int

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