Skip to content

Fonts

fonts

Bundled and installed font-file discovery.

__path__ = __import__('pkgutil').extend_path(__path__, __name__) module-attribute

__all__ = ('font_path', 'available') module-attribute

available()

Return bundled and installed font names from one process-lifetime snapshot.

sans and mono are first in that fixed order; installed names follow in Python code-point order. The first call discovers and imports entry points from group pixtreme.fonts atomically across threads. Both success and failure are cached until a fresh process, and provider failures raise actionable RuntimeError rather than exposing a partial catalog.

font_path(name)

Return the filesystem path snapshot registered under one exact font name.

Names are non-empty, exact, case-sensitive strings without surrounding whitespace or NUL. Bundled sans and mono paths bypass installed provider discovery. Other names trigger the process-lifetime entry-point snapshot; its provider-supplied Path is returned without resolving it or rechecking it after discovery, so it can become stale. Invalid or unknown names raise actionable ValueError; bundled-data or provider-catalog failures raise actionable RuntimeError.