FLUTTER ECOSYSTEM

congthanhng/font_mapper

フォントファイルをスキャンして、pubspec.yaml の `fonts:` セクションを自動生成する Dart CLI ツールです。

font_mapper のプロジェクト画像
Stars
0
Forks
0
最終プッシュ(UTC)
2025/06/26
プロジェクト状態
公開中
Cong Nguyen GitHub avatar
GITHUB User

Cong Nguyen ↗

Solving...

言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

Font Mapper 🧩

A Dart CLI tool to scan font files and auto-generate the fonts: section in your pubspec.yaml.

🔧 Installation

dart pub global activate font_mapper

🚀 Usage

🔧 Basic
font_mapper

This scans assets/fonts and updates the fonts: section in pubspec.yaml.

🛠 With options
font_mapper -t pubspec.yaml -d assets/my_fonts

-t / --target: Target YAML file (default: pubspec.yaml)

-d / --dir: Directory containing font files (default: assets/fonts)

-h / --help: Show help

📂 Supported Fonts

.ttf, .otf formats

Supports multi-family directories

📄 Output Example

If you have:

assets/fonts/
├── SF-Pro-Display-BoldItalic.ttf
├── SF-Pro-Display-Regular.ttf
├── Inter-Light.otf

Running font_mapper generates:

flutter:
  fonts:
    - family: SF-Pro-Display
      fonts:
        - asset: assets/fonts/SF-Pro-Display-BoldItalic.ttf
          weight: 700
          style: italic
        - asset: assets/fonts/SF-Pro-Display-Regular.ttf
          weight: 400
    - family: Inter
      fonts:
        - asset: assets/fonts/Inter-Light.otf
          weight: 300

🔐 License

MIT License. See LICENSE.

🧑‍💻 Contributing

Feel free to open PRs or issues on GitHub!

Sponsoring

Buy Me A Coffee

OR

7ezgif-5-20a8a8001a