diff --git a/mobile/packages/ui/.gitignore b/mobile/packages/ui/.gitignore index adf09d9f51..b84f47ac2c 100644 --- a/mobile/packages/ui/.gitignore +++ b/mobile/packages/ui/.gitignore @@ -9,4 +9,7 @@ ios/ .dart_tool/ .packages .flutter-plugins -.flutter-plugins-dependencies \ No newline at end of file +.flutter-plugins-dependencies + +# Fonts copied by build process +fonts/ \ No newline at end of file diff --git a/mobile/packages/ui/showcase/assets/immich-text-dark.png b/mobile/packages/ui/showcase/assets/immich-text-dark.png new file mode 100644 index 0000000000..215687af8f Binary files /dev/null and b/mobile/packages/ui/showcase/assets/immich-text-dark.png differ diff --git a/mobile/packages/ui/showcase/assets/immich-text-light.png b/mobile/packages/ui/showcase/assets/immich-text-light.png new file mode 100644 index 0000000000..478158d39c Binary files /dev/null and b/mobile/packages/ui/showcase/assets/immich-text-light.png differ diff --git a/mobile/packages/ui/showcase/lib/app_theme.dart b/mobile/packages/ui/showcase/lib/app_theme.dart index 66e64d4645..995bf3c91e 100644 --- a/mobile/packages/ui/showcase/lib/app_theme.dart +++ b/mobile/packages/ui/showcase/lib/app_theme.dart @@ -36,6 +36,7 @@ class AppTheme { outlineVariant: _light300, ), useMaterial3: true, + fontFamily: 'GoogleSans', scaffoldBackgroundColor: _light50, cardTheme: const CardThemeData( elevation: 0, @@ -73,6 +74,7 @@ class AppTheme { outlineVariant: Color(0xFF43464F), ), useMaterial3: true, + fontFamily: 'GoogleSans', scaffoldBackgroundColor: _darkLight50, cardTheme: const CardThemeData( elevation: 0, diff --git a/mobile/packages/ui/showcase/lib/pages/design_system/constants_page.dart b/mobile/packages/ui/showcase/lib/pages/design_system/constants_page.dart index c120cc7790..05916f987c 100644 --- a/mobile/packages/ui/showcase/lib/pages/design_system/constants_page.dart +++ b/mobile/packages/ui/showcase/lib/pages/design_system/constants_page.dart @@ -175,7 +175,7 @@ class _SpacingBox extends StatelessWidget { children: [ SizedBox( width: 60, - child: Text(label, style: const TextStyle(fontFamily: 'monospace')), + child: Text(label, style: const TextStyle(fontFamily: 'GoogleSansCode')), ), Container( width: size, @@ -281,7 +281,7 @@ class _BorderBox extends StatelessWidget { children: [ SizedBox( width: 80, - child: Text(label, style: const TextStyle(fontFamily: 'monospace')), + child: Text(label, style: const TextStyle(fontFamily: 'GoogleSansCode')), ), Expanded( child: Container( @@ -338,7 +338,7 @@ class _AnimatedDurationBoxState extends State<_AnimatedDurationBox> { width: 90, child: Text( widget.label, - style: const TextStyle(fontFamily: 'monospace', fontSize: 12), + style: const TextStyle(fontFamily: 'GoogleSansCode', fontSize: 12), ), ), Expanded( diff --git a/mobile/packages/ui/showcase/lib/widgets/example_card.dart b/mobile/packages/ui/showcase/lib/widgets/example_card.dart index 7e28c738c6..162d11b580 100644 --- a/mobile/packages/ui/showcase/lib/widgets/example_card.dart +++ b/mobile/packages/ui/showcase/lib/widgets/example_card.dart @@ -195,7 +195,7 @@ class _CodeCard extends StatelessWidget { child: Text( '${index + 1}', style: TextStyle( - fontFamily: 'monospace', + fontFamily: 'GoogleSansCode', fontSize: 13, color: lineNumberColor, height: 1.5, @@ -208,7 +208,7 @@ class _CodeCard extends StatelessWidget { SelectableText.rich( _codeHighlighter.highlight(code), style: const TextStyle( - fontFamily: 'monospace', + fontFamily: 'GoogleSansCode', fontSize: 13, height: 1.54, ), diff --git a/mobile/packages/ui/showcase/lib/widgets/shell_layout.dart b/mobile/packages/ui/showcase/lib/widgets/shell_layout.dart index e71037a88e..8bcb687e75 100644 --- a/mobile/packages/ui/showcase/lib/widgets/shell_layout.dart +++ b/mobile/packages/ui/showcase/lib/widgets/shell_layout.dart @@ -23,12 +23,13 @@ class ShellLayout extends StatelessWidget { children: [ Image.asset('assets/immich_logo.png', height: 32, width: 32), const SizedBox(width: 8), - Text( - 'immich', - style: Theme.of(context).textTheme.titleLarge?.copyWith( - fontWeight: FontWeight.w600, - color: Theme.of(context).colorScheme.onSurface, - ), + Image.asset( + isDark + ? 'assets/immich-text-dark.png' + : 'assets/immich-text-light.png', + height: 24, + filterQuality: FilterQuality.none, + isAntiAlias: true, ), ], ), diff --git a/mobile/packages/ui/showcase/pubspec.yaml b/mobile/packages/ui/showcase/pubspec.yaml index 2cfd5ff8c3..01092bd520 100644 --- a/mobile/packages/ui/showcase/pubspec.yaml +++ b/mobile/packages/ui/showcase/pubspec.yaml @@ -23,4 +23,24 @@ flutter: uses-material-design: true assets: - assets/ - - assets/themes/ \ No newline at end of file + - assets/themes/ + + fonts: + - family: GoogleSans + fonts: + - asset: ../../../fonts/GoogleSans/GoogleSans-Regular.ttf + - asset: ../../../fonts/GoogleSans/GoogleSans-Italic.ttf + style: italic + - asset: ../../../fonts/GoogleSans/GoogleSans-Medium.ttf + weight: 500 + - asset: ../../../fonts/GoogleSans/GoogleSans-SemiBold.ttf + weight: 600 + - asset: ../../../fonts/GoogleSans/GoogleSans-Bold.ttf + weight: 700 + - family: GoogleSansCode + fonts: + - asset: ../../../fonts/GoogleSansCode/GoogleSansCode-Regular.ttf + - asset: ../../../fonts/GoogleSansCode/GoogleSansCode-Medium.ttf + weight: 500 + - asset: ../../../fonts/GoogleSansCode/GoogleSansCode-SemiBold.ttf + weight: 600 \ No newline at end of file