Skip to main content

fontpkg

Fonts as ordinary Python project dependencies. Inspired by Fontsource.

uv add fontpkg fontpkg-inter
import fontpkg

font_path = fontpkg.path("inter")                 # Path to 400/normal
fontpkg.path("Inter", weight=700, style="italic") # names are case/space-insensitive
fontpkg.path("Inter", weight=650, nearest=True)

fam = fontpkg.family("Inter")    # .weights, .styles, .axes, .is_variable, .license
fontpkg.families()               # everything installed in the environment

Find installable families with fontpkg search <query> (matches family, slug, or category; the only CLI command that touches the network) or fontpkg list for what is already installed.

Integrations (extras fontpkg[pil], fontpkg[matplotlib]):

from fontpkg.pil import truetype
img_font = truetype("Roboto", size=24, weight=500)   # sets VF weight axis for you

from fontpkg.mpl import use
prop = use("Roboto", set_default=True)

Font packages are generated from google/fonts (OFL/Apache-licensed families only) — see the repository root for the generator.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fontpkg-0.2.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fontpkg-0.2.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file fontpkg-0.2.1.tar.gz.

File metadata

  • Download URL: fontpkg-0.2.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fontpkg-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b78e8905f4dce6e02243110548d907fb4a24f5dde464814b42c4da6983d5758e
MD5 212ce98ce3f03a9895cc0324c9c2d494
BLAKE2b-256 63435029c04977717d31b5d75a4ebcda08b54f2cc0e7897e2e62701a9640fd9e

See more details on using hashes here.

File details

Details for the file fontpkg-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fontpkg-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fontpkg-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b3b506d0b792a2e4cbafbdd766b1326dba99934a955ebf5e47580872f43607a
MD5 8508b4ff1d1d122e3abc80cc00c60d91
BLAKE2b-256 5f1cf07206d90feb3b06020153d7d355ca53388bdee4731c08b64d812351bbc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page