Skip to main content

A CLI tool to search and download Google Webfonts

Project description

Font Downloader

A CLI to find and download Google Fonts. It consolidates TTF/OTF/TTC from the family ZIP or the google/fonts repo, adds all available WOFF/WOFF2 weights via the CSS2 API, writes OFL.txt, and generates an SCSS snippet.

Installation

pip install -e .

Commands

Search

python -m fontdownloader.cli search "Roboto"

Download one or more families (consolidated)

# Single
python -m fontdownloader.cli download "Roboto" --force

# Multiple
python -m fontdownloader.cli download "Inter" "Roboto" "Lora"

# From file (one name per line)
python -m fontdownloader.cli download --file fonts.txt
  • Downloads TTF/OTF/TTC + OFL.txt (ZIP first, repo fallback)
  • Adds all WOFF/WOFF2 weights (100–900, normal/italic) via CSS2
  • Writes SCSS to assets/scss/<Family>.scss
  • Outputs files under assets/fonts/<Family>/

Download many families (legacy)

python -m fontdownloader.cli download-all --limit 100
  • Uses the same consolidated flow per family

Generate SCSS only

python -m fontdownloader.cli generate-scss "Roboto"
  • Regenerates assets/scss/Roboto.scss based on current files in assets/fonts/Roboto/

Output

  • assets/fonts/<Family>/: TTF/OTF/TTC and WOFF/WOFF2 files, plus OFL.txt
  • assets/scss/<Family>.scss: @font-face rules for downloaded variants

Notes

  • No API key required. If the ZIP is blocked, the tool falls back to the google/fonts GitHub repo for TTF/OTF/TTC.
  • Optional: set a GITHUB_TOKEN in your environment to raise GitHub API rate limits.
  • The assets/ directory is ignored by git by default.

Project details


Download files

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

Source Distribution

fontdownloader-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

fontdownloader-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fontdownloader-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fontdownloader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fffbf650614fcc6ee8bffd69293e640320a9805c20f479c88a2a274686e4ff97
MD5 e20ba1033f2ea593368ffe50b7fec5e1
BLAKE2b-256 a711b8a5cd959a19a5061ff6551fb574e937c1d0fb6ec5bcca06a5853bda4e96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fontdownloader-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fontdownloader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f76179a8e46323d9c9e640002fda71819f781e519e67e29d9f4e89ea60429c3a
MD5 7214547d4d9ea23f98845ab466e8ea18
BLAKE2b-256 8d281cadc9345d815fc3d1705d661d6970ba0a93cfefcf9f9869f65e16a1380a

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 Pingdom Monitoring Sentry Error logging StatusPage Status page