Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# manimpango.register_font

register_font(font_path)

  This function registers the font file using native OS API to make the font available for use by Pango. On Linux it is aliased to `fc_register_font()` and on Windows and macOS it uses the native API.

  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("C:/home/roboto.tff")
      True

  Raises:

    AssertionError – The :param:`font_path` specified doesn’t exist.

  Parameters:

    font_path (str)

  Return type:

    None