Skip to main content

Font Organizer: Modern Font Management Tool

Build & Test Release PyPI version

Font Organizer is a powerful Python-based tool for managing and organizing font collections. It provides intelligent font detection, automated organization, subsetting capabilities, and comprehensive analysis features to help you manage large font libraries efficiently.

🚀 Features

  • 🔍 Smart Font Detection: Automatically discover fonts across your system
  • 📁 Intelligent Organization: Sort and categorize fonts by various criteria (family, style, weight)
  • 🔤 Font Subsetting: Extract specific character sets for optimized web fonts
  • 📊 Analysis Tools: Examine font metrics, character coverage, and OpenType features
  • 🚀 High Performance: Efficient processing of large font collections with multi-threading support
  • 🔄 Duplicate Detection: Find and manage duplicate fonts by hash and metadata
  • 📈 Reporting: Generate detailed HTML/PDF reports about your font collection

📦 Installation

Using pip (Recommended)

pip install font-organizer

Using uv (Fast Alternative)

uv pip install font-organizer

From Source

git clone https://github.com/twardoch/font-organizer.git
cd font-organizer
pip install -e .

🎯 Quick Start

Basic Usage

# Scan a directory for fonts
font-organizer scan ~/Fonts

# Organize fonts by family
font-organizer organize ~/Fonts --by family --output ~/OrganizedFonts

# Get information about a specific font
font-organizer info ~/Fonts/Arial.ttf

# Find duplicate fonts
font-organizer duplicates ~/Fonts

# Create a subset with basic Latin characters
font-organizer subset input.ttf output.woff2 --text "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"

Command Overview

font-organizer --help

Available commands:

  • scan - Scan directories for font files
  • organize - Organize fonts using various criteria
  • analyze - Analyze font collections and generate reports
  • subset - Create font subsets with specific characters
  • duplicates - Find and manage duplicate fonts
  • info - Display detailed font information
  • config - Manage configuration settings

🔧 Configuration

Font Organizer can be configured using a YAML configuration file:

# ~/.font-organizer/config.yaml
organize:
  default_scheme: family  # family, style, weight, or custom
  copy_mode: true  # true for copy, false for move
  
scan:
  include_system_fonts: true
  recursive: true
  font_extensions:
    - .ttf
    - .otf
    - .woff
    - .woff2
    
subset:
  default_format: woff2
  optimize: true

📚 Advanced Usage

Organizing Fonts

# Organize by multiple criteria
font-organizer organize ~/Fonts --by family,weight --output ~/Organized

# Use custom organization rules
font-organizer organize ~/Fonts --rules my-rules.yaml --output ~/Organized

# Dry run to preview organization
font-organizer organize ~/Fonts --dry-run

Font Analysis

# Generate comprehensive analysis report
font-organizer analyze ~/Fonts --output report.html

# Export font list to CSV
font-organizer analyze ~/Fonts --format csv --output fonts.csv

# Check character coverage
font-organizer analyze ~/Fonts --coverage "Latin,Cyrillic"

Subsetting Fonts

# Create subset with Unicode ranges
font-organizer subset input.ttf output.woff2 --unicodes "U+0020-007F,U+00A0-00FF"

# Subset for specific language
font-organizer subset input.ttf output.woff2 --language en,es,fr

# Keep specific OpenType features
font-organizer subset input.ttf output.woff2 --features "kern,liga"

🐍 Python API

from font_organizer import FontOrganizer, FontInfo

# Initialize organizer
organizer = FontOrganizer()

# Scan for fonts
fonts = organizer.scan_directory("~/Fonts")

# Get font information
for font_path in fonts:
    info = FontInfo(font_path)
    print(f"{info.family} - {info.style} ({info.weight})")
    print(f"  Characters: {len(info.characters)}")
    print(f"  Features: {', '.join(info.features)}")

# Organize fonts
organizer.organize(
    source="~/Fonts",
    destination="~/OrganizedFonts",
    scheme="family"
)

# Find duplicates
duplicates = organizer.find_duplicates("~/Fonts")
for group in duplicates:
    print(f"Duplicate group ({len(group)} files):")
    for font in group:
        print(f"  - {font}")

🛠️ Development

Setting up Development Environment

# Clone the repository
git clone https://github.com/twardoch/font-organizer.git
cd font-organizer

# Install development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

# Run tests
pytest

# Run linting
ruff check src tests
mypy src tests

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=font_organizer --cov-report=html

# Run specific test file
pytest tests/test_font_info.py

📖 Documentation

Full documentation is available at https://twardoch.github.io/font-organizer/

🤝 Contributing

Contributions are welcome! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with fonttools for font manipulation
  • Uses rich for beautiful terminal output
  • Powered by fire for CLI interface

📬 Contact

Adam Twardoch - @adamtwar - adam+github@twardoch.com

Project Link: https://github.com/twardoch/font-organizer

Metadata

Release files for twat-font 2.7.10

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

Source distribution (sdist)

Source distribution for twat-font 2.7.10
File Size Uploaded Provenance Actions
twat_font-2.7.10.tar.gz 68.2 kB Without provenance Details for twat_font-2.7.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for twat-font 2.7.10
File Interpreter ABI Platform Actions
twat_font-2.7.10-py3-none-any.whl Python 3 none any Details for twat_font-2.7.10-py3-none-any.whl

Total release size: 89.2 kB

Release files / twat_font-2.7.10.tar.gz

Download URL twat_font-2.7.10.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c6b3a51cab83d6d7cffd0ba4912269a174caeed904210a47abb19e4da7342683
BLAKE2b-256 checksum
How to use checksums
3a29e9f0bdb5e75aa91caba711b3cfee1feda6913a0d0958649911c62fa39c47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / twat_font-2.7.10-py3-none-any.whl

Download URL twat_font-2.7.10-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d9086d642cca73a9fb5b623d337cc9a02b2a6e9d97d00471242c1479d88f857
BLAKE2b-256 checksum
How to use checksums
dbb7d20710bbd84c8d3a43e4736d7b638b0e03455c006536e78316134e923b04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for twat-font 2.7.10

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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