geez_fonts 0.1.0
geez_fonts: ^0.1.0 copied to clipboard
A Flutter package for dynamically loading and using Ethiopic (Ge'ez) fonts from the Geez Archive. Provides 150+ font families with TextStyle and TextTheme support.
import 'package:flutter/material.dart';
import 'package:geez_fonts/geez_fonts.dart';
void main() {
runApp(const GeezFontsExample());
}
class GeezFontsExample extends StatelessWidget {
const GeezFontsExample({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
// Apply a Geez font to the entire app theme
theme: ThemeData(
textTheme: GeezFonts.benaiahTextTheme(),
),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Geez Fonts Example')),
body: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Use a named font method
Text(
'ሰላም ዓለም — Benaiah',
style: GeezFonts.benaiah(fontSize: 24),
),
const SizedBox(height: 16),
// Use getFont() for dynamic font selection
Text(
'ሰላም ዓለም — Adwa',
style: GeezFonts.getFont('Adwa', fontSize: 24),
),
const SizedBox(height: 16),
// Merge with an existing TextStyle
Text(
'ሰላም ዓለም — Brana (bold)',
style: GeezFonts.brana(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
],
),
),
);
}
}