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

# manimpango.register_font

register_font(font_path)

  This function registers the font file using `fontconfig` so that it is available for use by Pango. On Linux it is aliased to `register_font()` and on Windows and macOS this would work only when using `fontconfig` backend.

  Parameters:

    font_path (`str`) – Relative or absolute path to font file.

  Returns:

    True means it worked without any error. False means there was an unknown error

  Return type:

    `bool`

  Examples

      >>> register_font("/home/roboto.tff")
      True

  Raises:

    AssertionError – Font is missing.