Skip to main content

fontpkg

Fonts as ordinary Python project dependencies. Inspired by Fontsource.

uv add fontpkg fontpkg-roboto
import fontpkg

fontpkg.path("Roboto")                            # Path to 400/normal
fontpkg.path("Roboto", weight=700, style="italic")
fontpkg.path("Roboto", weight=650, nearest=True)

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

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.1.0.tar.gz (7.2 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.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fontpkg-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for fontpkg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76e07cd43af4465c5b4130d425d39e1917e717c9079d962cd5dd16c968326883
MD5 c6db41beffb08863e648aebaeda80033
BLAKE2b-256 1043f8db7767f4abe4b5fa5408cf53e72960503c0a5b309aa5d68d1551eeded0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fontpkg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for fontpkg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b0b1b20e8f66de63f848b73a7189a44d10f69b4d0c2453f8a60ba8cd1d7af79
MD5 b4773ab690ba8ef5303148b85a4fe382
BLAKE2b-256 4b507fe591ffdbe192c1d004068b706b508b2ce76f4e83bd8c819208a0cae37a

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