Skip to content

[Doc]: FontManager docs should mention the singleton is named fontManager #22586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
twm opened this issue Mar 2, 2022 · 0 comments · Fixed by #22591
Closed

[Doc]: FontManager docs should mention the singleton is named fontManager #22586

twm opened this issue Mar 2, 2022 · 0 comments · Fixed by #22591

Comments

@twm
Copy link

twm commented Mar 2, 2022

Documentation Link

https://matplotlib.org/devdocs/api/font_manager_api.html

Problem

The reference documentation for the FontManager class says that there is a singleton:

This module provides a single FontManager instance that can be shared across backends and platforms.

However, it doesn't mention that this singleton is named fontManager.

Suggested improvement

  • The docstring should clarify that the singleton is named fontManager, rather than implying that the FontManager class is a singleton:

    This module provides a single `FontManager` instance, `fontManager`, that is shared across backends and platforms.
  • The fontManager instance should be documented as a global variable:

    .. data:: fontManager
    
        The singleton instance of :class:`FontManager`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant