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.0a39
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx_fonts-0.1.0a39.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_fonts-0.1.0a39-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / sphinx_fonts-0.1.0a39.tar.gz
| Download URL | sphinx_fonts-0.1.0a39.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be2ceda9adb92023ab85ca232a43275d17bed8d844a856e80233eaa8b69b90b1
|
|
BLAKE2b-256 checksum How to use checksums |
b10ca11bf54fef30a72f2d823cd62c3db474e345d2373bbe0cd76cc1aca9aede
|
| 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 Sep 6, 2026.
Transparency logRelease files / sphinx_fonts-0.1.0a39-py3-none-any.whl
| Download URL | sphinx_fonts-0.1.0a39-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e97892a93d1fbda40ab1b9eaab6717498463b37617a07b2ffdd0305eab5de6d
|
|
BLAKE2b-256 checksum How to use checksums |
e615c149845014e078f17c406f8c7e89345d8570e580a29753f3558776400488
|
| 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 Sep 6, 2026.
Transparency log