Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

sphinx-fonts

Sphinx extension for self-hosted fonts via Fontsource CDN.

Downloads font files at build time, caches them locally (~/.cache/sphinx-fonts), and injects @font-face declarations via Jinja2 template context.

Install

$ pip install sphinx-fonts

Usage

In your docs/conf.py:

extensions = ["sphinx_fonts"]

sphinx_fonts = [
    {
        "family": "IBM Plex Sans",
        "package": "@fontsource/ibm-plex-sans",
        "version": "5.2.8",
        "weights": [400, 500, 600, 700],
        "styles": ["normal", "italic"],
        "subset": "latin",
    },
]

sphinx_font_css_variables = {
    "--font-stack": '"IBM Plex Sans", sans-serif',
}

Requires a page.html template override that reads the font_faces and font_preload_hrefs context variables. See the gp-sphinx docs for a complete template example.

Release files for sphinx-fonts 0.1.0a38

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-fonts 0.1.0a38
File Size Uploaded
sphinx_fonts-0.1.0a38.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-fonts 0.1.0a38
File Interpreter ABI Platform
sphinx_fonts-0.1.0a38-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / sphinx_fonts-0.1.0a38.tar.gz

Download URL sphinx_fonts-0.1.0a38.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ed0a8dc4c1cb3b9389ac502aad8b29410c90480a3df2830caf85b54ce76d66a2
BLAKE2b-256 checksum
How to use checksums
44229e0d99c6fa8811c117574ab4ce119c6a070c18fa5d7f69a7af66648babab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / sphinx_fonts-0.1.0a38-py3-none-any.whl

Download URL sphinx_fonts-0.1.0a38-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cef8297682da5d48c41f4bcdbbf8db6d1fb44b55a27987823eb98e256e616671
BLAKE2b-256 checksum
How to use checksums
98deedd6c56399a5cc479f94ef855914d084ac9c83bd5b2ef477732a95027e54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a38 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page