diff --git a/fonts/Atkinson-Hyperlegible-Bold-102.ttf b/fonts/Atkinson-Hyperlegible-Bold-102.ttf new file mode 100644 index 0000000..14b7196 Binary files /dev/null and b/fonts/Atkinson-Hyperlegible-Bold-102.ttf differ diff --git a/fonts/Atkinson-Hyperlegible-BoldItalic-102.ttf b/fonts/Atkinson-Hyperlegible-BoldItalic-102.ttf new file mode 100644 index 0000000..4532705 Binary files /dev/null and b/fonts/Atkinson-Hyperlegible-BoldItalic-102.ttf differ diff --git a/fonts/Atkinson-Hyperlegible-Italic-102.ttf b/fonts/Atkinson-Hyperlegible-Italic-102.ttf new file mode 100644 index 0000000..89e5ce4 Binary files /dev/null and b/fonts/Atkinson-Hyperlegible-Italic-102.ttf differ diff --git a/fonts/Atkinson-Hyperlegible-Regular-102.ttf b/fonts/Atkinson-Hyperlegible-Regular-102.ttf new file mode 100644 index 0000000..c4fa6fb Binary files /dev/null and b/fonts/Atkinson-Hyperlegible-Regular-102.ttf differ diff --git a/lib/partials/post.dart b/lib/partials/post.dart index 3d8c598..b817ccb 100644 --- a/lib/partials/post.dart +++ b/lib/partials/post.dart @@ -59,7 +59,7 @@ class DisplayName extends StatelessWidget { children: [ Text( account.displayName, - style: Theme.of(context).textTheme.titleMedium, + style: Theme.of(context).textTheme.displaySmall, ), Text( account.acct, diff --git a/lib/partials/post_text_renderer.dart b/lib/partials/post_text_renderer.dart index 9d2c9d0..3768081 100644 --- a/lib/partials/post_text_renderer.dart +++ b/lib/partials/post_text_renderer.dart @@ -15,6 +15,7 @@ class PostTextRenderer extends StatelessWidget { final List children = createSpansFromDoc(document.body!.children); return SelectableText.rich(TextSpan( + style: Theme.of(context).textTheme.bodyMedium, text: "", children: children, )); diff --git a/lib/themes/themes.dart b/lib/themes/themes.dart index f0386d7..02a8e60 100644 --- a/lib/themes/themes.dart +++ b/lib/themes/themes.dart @@ -4,6 +4,61 @@ import 'dracula.dart' as color_dracula; final available = [color_dracula.theme]; ThemeData getTheme(CustomColors colors) { return ThemeData( + fontFamily: 'Atkinson', + textTheme: TextTheme( + bodyLarge: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 24, + ), + bodyMedium: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 18, + ), + bodySmall: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 14, + ), + displayLarge: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 42, + fontWeight: FontWeight.w700, + ), + displayMedium: TextStyle( + color: colors.colorScheme.onSurface, + fontWeight: FontWeight.w700, + fontSize: 36, + ), + displaySmall: TextStyle( + color: colors.colorScheme.onSurface, + fontWeight: FontWeight.w700, + fontSize: 24, + ), + headlineLarge: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 42, + ), + headlineMedium: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 36, + ), + headlineSmall: TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 24, + ), + ), + textButtonTheme: TextButtonThemeData( + style: ButtonStyle( + textStyle: MaterialStateProperty.all( + const TextStyle(fontSize: 18), + ), + ), + ), + popupMenuTheme: PopupMenuThemeData( + color: colors.colorScheme.background, + textStyle: TextStyle( + color: colors.colorScheme.onBackground, + ), + ), scaffoldBackgroundColor: colors.colorScheme.background, bottomAppBarColor: colors.colorScheme.background, hintColor: colors.hintColor, @@ -14,7 +69,11 @@ ThemeData getTheme(CustomColors colors) { shape: const CircularNotchedRectangle(), elevation: 0, ), - navigationBarTheme: const NavigationBarThemeData( + navigationBarTheme: NavigationBarThemeData( + labelTextStyle: MaterialStateProperty.all(TextStyle( + color: colors.colorScheme.onSurface, + fontSize: 14, + )), backgroundColor: Colors.transparent, labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected, indicatorColor: Colors.transparent, diff --git a/pubspec.yaml b/pubspec.yaml index e0b6a9b..17440f0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -95,3 +95,14 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + fonts: + - family: Atkinson + fonts: + - asset: fonts/Atkinson-Hyperlegible-Regular-102.ttf + - asset: fonts/Atkinson-Hyperlegible-Italic-102.ttf + style: italic + - asset: fonts/Atkinson-Hyperlegible-Bold-102.ttf + weight: 700 + - asset: fonts/Atkinson-Hyperlegible-BoldItalic-102.ttf + style: italic + weight: 700 \ No newline at end of file