FLUTTER ECOSYSTEM

congthanhng/font_mapper

폰트 파일을 스캔하고 pubspec.yaml의 `fonts:` 섹션을 자동으로 생성하는 Dart CLI 도구입니다.

font_mapper 프로젝트 이미지
Stars
0
Forks
0
최근 푸시(UTC)
2025. 6. 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