π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Replace legacy Photos fonts
AmanRajSinghMourya30a9d406d7f9
diff --git a/mobile/apps/photos/changes/remove-legacy-fonts.md b/mobile/apps/photos/changes/remove-legacy-fonts.mdnew file mode 100644index 0000000000..c7b2c002bf--- /dev/null+++ b/mobile/apps/photos/changes/remove-legacy-fonts.md@@ -0,0 +1 @@+- Replaced legacy Nunito and Montserrat text styles with Outfit.diff --git a/mobile/apps/photos/fonts/Montserrat-Bold.ttf b/mobile/apps/photos/fonts/Montserrat-Bold.ttfdeleted file mode 100644index 55e0b1a553..0000000000Binary files a/mobile/apps/photos/fonts/Montserrat-Bold.ttf and /dev/null differdiff --git a/mobile/apps/photos/fonts/Nunito-Black.ttf b/mobile/apps/photos/fonts/Nunito-Black.ttfdeleted file mode 100644index 99491f840f..0000000000Binary files a/mobile/apps/photos/fonts/Nunito-Black.ttf and /dev/null differdiff --git a/mobile/apps/photos/fonts/Nunito-Regular.ttf b/mobile/apps/photos/fonts/Nunito-Regular.ttfdeleted file mode 100644index be80c3f04d..0000000000Binary files a/mobile/apps/photos/fonts/Nunito-Regular.ttf and /dev/null differdiff --git a/mobile/apps/photos/lib/ui/components/banners/banner_action_button.dart b/mobile/apps/photos/lib/ui/components/banners/banner_action_button.dartindex e98c6ebfde..d26929c275 100644--- a/mobile/apps/photos/lib/ui/components/banners/banner_action_button.dart+++ b/mobile/apps/photos/lib/ui/components/banners/banner_action_button.dart@@ -1,3 +1,4 @@+import "package:ente_components/theme/text_styles.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";import "package:photos/theme/colors.dart";@@ -47,12 +48,10 @@ class BannerActionButton extends StatelessWidget {final resolvedTagForegroundColor = stickTagToLightTheme? contentLight: colorScheme.contentReverse;- final tagTextStyle = textTheme.miniBold.copyWith(+ final tagTextStyle = TextStyles.tiny.copyWith(color: resolvedTagForegroundColor,- fontWeight: FontWeight.w900,- fontFamily: "Nunito",- fontSize: 9,- height: 11 / 9,+ fontFamily: TextStyles.outfitFontFamily,+ fontWeight: FontWeight.w700,);final button = GestureDetector(diff --git a/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart b/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dartindex 91ff97feea..969f822d36 100644--- a/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";@@ -145,12 +146,7 @@ class _MLProgressBannerState extends State<MLProgressBanner> {final progress = total > 0 ? status.indexedItems.toDouble() / total : 0.0;final showModelDownloadPhase = _shouldShowModelDownloadPhase(status);- final titleStyle = textTheme.largeBold.copyWith(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 20,- height: 24 / 18,- letterSpacing: -1,+ final titleStyle = TextStyles.display3.copyWith(color: colorScheme.greenBase,);diff --git a/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dart b/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dartindex bac4daa7f8..dc9d4ad763 100644--- a/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dart@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";@@ -73,12 +74,7 @@ class _NameFaceBannerState extends State<NameFaceBanner> {child: Text(l10n.offlineNameFaceBannerTitle,textAlign: TextAlign.center,- style: textTheme.largeBold.copyWith(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 20,- height: 24 / 18,- letterSpacing: -1,+ style: TextStyles.display2.copyWith(color: colorScheme.textBase,),),diff --git a/mobile/apps/photos/lib/ui/components/banners/offline_settings_banner.dart b/mobile/apps/photos/lib/ui/components/banners/offline_settings_banner.dartindex 30bad8cb3e..8e13003a18 100644--- a/mobile/apps/photos/lib/ui/components/banners/offline_settings_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/offline_settings_banner.dart@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";@@ -29,14 +30,7 @@ class _OfflineSettingsBannerState extends State<OfflineSettingsBanner> {final textTheme = getEnteTextTheme(context);final l10n = context.strings;- final titleStyle = textTheme.largeBold.copyWith(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 20,- height: 24 / 18,- letterSpacing: -1,- color: Colors.white,- );+ final titleStyle = TextStyles.display3.copyWith(color: Colors.white);return GestureDetector(onTap: widget.onGetStarted,diff --git a/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dart b/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dartindex 1c367a374a..e5dada36b4 100644--- a/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dart@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";@@ -73,12 +74,7 @@ class _SaveFacesBannerState extends State<SaveFacesBanner> {child: Text(l10n.offlineFacesBannerTitle,textAlign: TextAlign.center,- style: textTheme.largeBold.copyWith(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 20,- height: 24 / 18,- letterSpacing: -1,+ style: TextStyles.display2.copyWith(color: colorScheme.textBase,),),diff --git a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dartindex 121468ac45..840d020d21 100644--- a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart+++ b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart@@ -124,12 +124,7 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {child: Text(context.strings.readyToBackupTitle,textAlign: TextAlign.center,- style: const TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w900,- fontSize: 32,- letterSpacing: -1.4,- ).copyWith(color: colorScheme.content),+ style: TextStyles.display1.copyWith(color: colorScheme.content),),),const SizedBox(height: 16),diff --git a/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dart b/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dartindex 1fd0a85a6d..ffad64ff3e 100644--- a/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dart+++ b/mobile/apps/photos/lib/ui/payment/subscription_plan_widget.dart@@ -1,5 +1,6 @@import 'dart:math' as math;+import 'package:ente_components/theme/text_styles.dart';import 'package:ente_pure_utils/ente_pure_utils.dart';import "package:ente_strings/ente_strings.dart";import 'package:flutter/material.dart';@@ -64,7 +65,8 @@ class SubscriptionPlanWidget extends StatelessWidget {text: TextSpan(style: TextStyle(color: colorScheme.contentDarker,- fontFamily: "Nunito",+ fontFamily: TextStyles.outfitFontFamily,+ package: TextStyles.fontPackage,fontWeight: FontWeight.w900,),children: [@@ -138,15 +140,13 @@ class SubscriptionPlanWidget extends StatelessWidget {horizontal: 8,vertical: 2,),- child: const Text(+ child: Text("Most popular",textAlign: TextAlign.center,- style: TextStyle(+ style: TextStyles.tiny.copyWith(color: Colors.white,- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 10,- height: 20 / 10,+ fontFamily: TextStyles.outfitFontFamily,+ fontWeight: FontWeight.w700,),),),diff --git a/mobile/apps/photos/lib/ui/rituals/delete_ritual_confirmation_sheet.dart b/mobile/apps/photos/lib/ui/rituals/delete_ritual_confirmation_sheet.dartindex 0a59112483..71b9a985f0 100644--- a/mobile/apps/photos/lib/ui/rituals/delete_ritual_confirmation_sheet.dart+++ b/mobile/apps/photos/lib/ui/rituals/delete_ritual_confirmation_sheet.dart@@ -1,3 +1,4 @@+import "package:ente_components/theme/text_styles.dart";import "package:flutter/material.dart";import "package:photos/theme/ente_theme.dart";@@ -103,15 +104,9 @@ class _DeleteRitualConfirmationSheet extends StatelessWidget {Text("Are you sure?",textAlign: TextAlign.center,- style: const TextStyle(- fontFamily: "Nunito",- fontStyle: FontStyle.normal,- fontSize: 24,- fontWeight: FontWeight.w900,- letterSpacing: -0.72,- height: 1.15,- decoration: TextDecoration.none,- ).copyWith(color: colorScheme.textBase),+ style: TextStyles.display2.copyWith(+ color: colorScheme.textBase,+ ),textHeightBehavior: _tightTextHeightBehavior,),const SizedBox(height: 10),diff --git a/mobile/apps/photos/lib/ui/rituals/ritual_page.dart b/mobile/apps/photos/lib/ui/rituals/ritual_page.dartindex 8538cde00d..51cdc49fba 100644--- a/mobile/apps/photos/lib/ui/rituals/ritual_page.dart+++ b/mobile/apps/photos/lib/ui/rituals/ritual_page.dart@@ -2,6 +2,7 @@ import "dart:io";import "dart:math" as math;import "dart:ui" as ui;+import "package:ente_components/theme/text_styles.dart";import "package:ente_icons/ente_icons.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:ente_strings/ente_strings.dart";@@ -440,7 +441,8 @@ class _StreakCircle extends StatelessWidget {final text = streak.toString();const style = TextStyle(- fontFamily: "Nunito",+ fontFamily: TextStyles.outfitFontFamily,+ package: TextStyles.fontPackage,fontSize: 64,fontWeight: FontWeight.w900,letterSpacing: -1.6,@@ -613,7 +615,8 @@ class _StreakStatCard extends StatelessWidget {Text(streak.toString(),style: TextStyle(- fontFamily: "Nunito",+ fontFamily: TextStyles.outfitFontFamily,+ package: TextStyles.fontPackage,fontSize: 20,fontWeight: FontWeight.w900,letterSpacing: -0.2,diff --git a/mobile/apps/photos/lib/ui/rituals/ritual_share_card.dart b/mobile/apps/photos/lib/ui/rituals/ritual_share_card.dartindex f159a14c17..6677312f7e 100644--- a/mobile/apps/photos/lib/ui/rituals/ritual_share_card.dart+++ b/mobile/apps/photos/lib/ui/rituals/ritual_share_card.dart@@ -1,3 +1,4 @@+import "package:ente_components/theme/text_styles.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";import "package:flutter_svg/flutter_svg.dart";@@ -123,9 +124,10 @@ class _RitualDuckyShareArt extends StatelessWidget {final streakText = streak.toString();final fontSize = _streakFontSize(streakText);final textStyle = TextStyle(- fontFamily: "Nunito",+ fontFamily: TextStyles.outfitFontFamily,+ package: TextStyles.fontPackage,fontSize: fontSize,- fontWeight: FontWeight.w900,+ fontWeight: FontWeight.w700,color: Colors.white,decoration: TextDecoration.none,height: 1,diff --git a/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart b/mobile/apps/photos/lib/ui/settings/storage_card_widget.dartindex e68f01e61d..f4bf6b23ba 100644--- a/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart+++ b/mobile/apps/photos/lib/ui/settings/storage_card_widget.dart@@ -1,3 +1,4 @@+import 'package:ente_components/theme/text_styles.dart';import 'package:ente_pure_utils/ente_pure_utils.dart';import "package:ente_strings/ente_strings.dart";import "package:ente_ui/components/loading_widget.dart";@@ -169,10 +170,8 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {isMobileScreenSmall? context.strings.usedSpace: context.strings.storage,- style: const TextStyle(- fontFamily: 'Montserrat',- fontSize: 11,- fontWeight: FontWeight.w500,+ style: TextStyles.tiny.copyWith(+ fontFamily: TextStyles.outfitFontFamily,color: textMutedDark,),),@@ -181,10 +180,8 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {overflow: TextOverflow.ellipsis,maxLines: 1,text: TextSpan(- style: const TextStyle(- fontFamily: 'Montserrat',- fontSize: 24,- fontWeight: FontWeight.bold,+ style: TextStyles.display2.copyWith(+ fontWeight: FontWeight.w700,color: textBaseDark,letterSpacing: -1,),@@ -239,9 +236,8 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {const SizedBox(width: 4),Text(context.strings.storageBreakupYou,- style: const TextStyle(- fontFamily: 'Montserrat',- fontSize: 9,+ style: TextStyles.tiny.copyWith(+ fontFamily: TextStyles.outfitFontFamily,fontWeight: FontWeight.w600,color: textBaseDark,),@@ -258,9 +254,8 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {const SizedBox(width: 4),Text(context.strings.storageBreakupFamily,- style: const TextStyle(- fontFamily: 'Montserrat',- fontSize: 9,+ style: TextStyles.tiny.copyWith(+ fontFamily: TextStyles.outfitFontFamily,fontWeight: FontWeight.w600,color: textBaseDark,),@@ -273,11 +268,10 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {count: userDetails.fileCount,formattedCount: NumberFormat().format(userDetails.fileCount),),- style: const TextStyle(- fontFamily: 'Montserrat',- fontSize: 10,+ style: TextStyles.tiny.copyWith(+ fontFamily: TextStyles.outfitFontFamily,fontWeight: FontWeight.w600,- color: Color.fromRGBO(165, 165, 165, 0.79),+ color: const Color.fromRGBO(165, 165, 165, 0.79),),),],diff --git a/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart b/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dartindex f09d0bd45f..f9393acf46 100644--- a/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart+++ b/mobile/apps/photos/lib/ui/sharing/manage_links_widget.dart@@ -355,13 +355,8 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {dialogTitle: context.strings.qrCode,shareButtonText: context.strings.share,logoAssetPath: 'assets/qr_logo.png',- branding: const QrTextBranding(- text: 'ente',- style: TextStyle(- fontSize: 16,- fontWeight: FontWeight.w600,- fontFamily: 'Montserrat',- ),+ branding: const QrSvgBranding(+ assetPath: 'assets/ente-branding.svg',),);},diff --git a/mobile/apps/photos/lib/ui/sharing/public_link_enabled_actions_widget.dart b/mobile/apps/photos/lib/ui/sharing/public_link_enabled_actions_widget.dartindex c8925f4a88..abab5e9687 100644--- a/mobile/apps/photos/lib/ui/sharing/public_link_enabled_actions_widget.dart+++ b/mobile/apps/photos/lib/ui/sharing/public_link_enabled_actions_widget.dart@@ -86,13 +86,8 @@ class PublicLinkEnabledActionsWidget extends StatelessWidget {dialogTitle: context.strings.qrCode,shareButtonText: context.strings.share,logoAssetPath: 'assets/qr_logo.png',- branding: const QrTextBranding(- text: 'ente',- style: TextStyle(- fontSize: 16,- fontWeight: FontWeight.w600,- fontFamily: 'Montserrat',- ),+ branding: const QrSvgBranding(+ assetPath: 'assets/ente-branding.svg',),);},diff --git a/mobile/apps/photos/lib/ui/social/widgets/feed_empty_state.dart b/mobile/apps/photos/lib/ui/social/widgets/feed_empty_state.dartindex 569234cf02..57de09c381 100644--- a/mobile/apps/photos/lib/ui/social/widgets/feed_empty_state.dart+++ b/mobile/apps/photos/lib/ui/social/widgets/feed_empty_state.dart@@ -51,12 +51,7 @@ class FeedEmptyState extends StatelessWidget {Text(content.title,textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 24,- height: 28 / 24,- letterSpacing: 0,+ style: TextStyles.display2.copyWith(color: colors.textBase,),),diff --git a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dart b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dartindex a57a1baa83..ba50d1dbfa 100644--- a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dart@@ -110,14 +110,7 @@ class OnDeviceEmptyState extends StatelessWidget {child: Text(strings.noAlbumsOnThisDevice,textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 24,- height: 28 / 24,- letterSpacing: 0,- color: colors.textBase,- ),+ style: TextStyles.display2.copyWith(color: colors.textBase),),),const SizedBox(height: 8),diff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yamlindex 064eb10375..34ea9d1b33 100644--- a/mobile/apps/photos/pubspec.yaml+++ b/mobile/apps/photos/pubspec.yaml@@ -305,15 +305,6 @@ flutter:- asset: fonts/Inter-Light.ttf- asset: fonts/Inter-SemiBold.ttf- asset: fonts/Inter-Bold.ttf- - family: Montserrat- fonts:- - asset: fonts/Montserrat-Bold.ttf- - family: Nunito- fonts:- - asset: fonts/Nunito-Regular.ttf- - asset: fonts/Nunito-Black.ttf- weight: 900-uses-material-design: truegenerate: true