A Flutter package that enables dynamic loading and usage of Ethiopic (Ge'ez) fonts from the Geez Archive. Provides 150+ font families with full TextStyle and TextTheme support β just like google_fonts, but for Ethiopic typography.
# geez_fonts
A Flutter package that enables dynamic loading and usage of **Ethiopic (Ge'ez) fonts** from the Geez Archive. Provides **150+ font families** with full `TextStyle` and `TextTheme` support β just like google_fonts, but for Ethiopic typography.
## Showcase
*The package dynamically loads and caches professional Ethiopic typography directly from the Geez Archive.*
## Features
- π€ **150+ Ethiopic font families** from the Geez Archive
- β‘ **Dynamic loading** β fonts are fetched at runtime, no bundling needed
- πΎ **Automatic caching** β fonts are cached to disk after first download
- π¨ **Named static methods** β `GeezFonts.benaiah()`, `GeezFonts.adwa()`, etc.
- π **TextTheme support** β apply any font across your entire theme
- π **Font lookup** β `GeezFonts.getFont('Adwa')` for dynamic font selection
- βοΈ **Configurable** β disable runtime fetching for bundled-only setups
## Installation
```sh
dart pub add geez_fonts
```
Or add to your `pubspec.yaml`:
```yaml
dependencies:
geez_fonts: ^0.1.0
```
## Usage
### Apply a font to a TextStyle
```dart
import 'package:geez_fonts/geez_fonts.dart';
Text(
'α°αα ααα',
style: GeezFonts.benaiah(fontSize: 24),
)
```
### Merge with an existing TextStyle
```dart
Text(
'α°αα ααα',
style: GeezFonts.adwa(
textStyle: Theme.of(context).textTheme.headlineMedium,
color: Colors.amber,
),
)
```
### Dynamic font selection
```dart
// Look up a font by name at runtime
final style = GeezFonts.getFont('Brana', fontSize: 18);
```
### Apply a font to an entire TextTheme
```dart
MaterialApp(
theme: ThemeData(
textTheme: GeezFonts.benaiahTextTheme(),
),
)
```
### Merge with an existing TextTheme
```dart
MaterialApp(
theme: ThemeData(
textTheme: GeezFonts.benaiahTextTheme(
Theme.of(context).textTheme,
),
),
)
```
### List all available fonts
```dart
final allFonts = GeezFonts.asMap();
print(allFonts.keys.toList()); // ['Benaiah', 'Adwa', 'Brana', ...]
```
## Configuration
```dart
// Disable runtime font fetching (e β¦