Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added Inter font family #357

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/fonts/Inter-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Inter-Regular.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions lib/core/constants/enums.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ enum Font {
quicksand,
barlow,
jost,
inter,
}

enum BookFormat {
Expand Down
12 changes: 12 additions & 0 deletions lib/ui/settings_screen/settings_apperance_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ class SettingsApperanceScreen extends StatelessWidget {
),
),
const SizedBox(height: 5),
SettingsDialogButton(
text: 'Inter',
onPressed: () => _setFont(
context,
state,
Font.inter,
),
),
const SizedBox(height: 5),
SettingsDialogButton(
text: 'Kanit',
onPressed: () => _setFont(
Expand Down Expand Up @@ -591,6 +600,9 @@ class SettingsApperanceScreen extends StatelessWidget {
case Font.barlow:
fontFamily = 'Barlow';
break;
case Font.inter:
fontFamily = 'Inter';
break;
case Font.jost:
fontFamily = 'Jost';
break;
Expand Down
5 changes: 5 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ flutter:
- asset: assets/fonts/Barlow-Regular.ttf
- asset: assets/fonts/Barlow-Bold.ttf
weight: 700
- family: Inter
fonts:
- asset: assets/fonts/Inter-Regular.ttf
- asset: assets/fonts/Inter-Bold.ttf
weight: 700
- family: Jost
fonts:
- asset: assets/fonts/Jost-Regular.ttf
Expand Down
Loading