Skip to content

Conversation

@Code0ut
Copy link

@Code0ut Code0ut commented Feb 3, 2026

Feature: Local Font Support with Priority-Based Loading

Short Summary

This PR adds robust local font loading support and updates the font selection priority system.

New priority order:

  1. Google Fonts (--font-family)
  2. Local font path (--font-path)
  3. Default local Roboto fallback

It also introduces CLI support and documentation for using local fonts.


Fixes

What I Changed

Font Loading Enhancements

  • Added load_fonts_from_path() in font_management.py

    • Supports:
      • Single font files and directories
      • Pattern matching for bold/regular/light (including numeric weights)
      • ~ expansion
      • Absolute & relative paths (Windows + Unix)
      • .ttf, .otf, .woff, .woff2 formats
  • Added local_FONT_LOADING.md ( user guide for using local fonts )

  • Updated load_fonts() signature:

load_fonts(font_family=None, font_path=None)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant