diff --git a/screenshots/assets/fonts/SF-Pro-Display-Bold-dark.zip b/screenshots/assets/fonts/SF-Pro-Display-Bold-dark.zip new file mode 100644 index 0000000..a5e29b1 Binary files /dev/null and b/screenshots/assets/fonts/SF-Pro-Display-Bold-dark.zip differ diff --git a/screenshots/assets/fonts/SF-Pro-Display-Regular-dark.zip b/screenshots/assets/fonts/SF-Pro-Display-Regular-dark.zip new file mode 100644 index 0000000..a034b30 Binary files /dev/null and b/screenshots/assets/fonts/SF-Pro-Display-Regular-dark.zip differ diff --git a/screenshots/convert_to_store_screenshot.dart b/screenshots/convert_to_store_screenshot.dart index 5ed7570..8223324 100644 --- a/screenshots/convert_to_store_screenshot.dart +++ b/screenshots/convert_to_store_screenshot.dart @@ -17,7 +17,6 @@ extension ScreenshotImage on Image { if (_configs[args.name] == null) { return this; } - print(args.deviceName); return _addSystemOverlay( screenshotDevices[args.deviceName]!, isDark: args.isDark, @@ -36,6 +35,7 @@ extension ScreenshotImage on Image { layout, _configs[args.name]!.title, _configs[args.name]!.subtitle, + isDark: args.isDark, ); } @@ -96,9 +96,11 @@ extension ScreenshotImage on Image { ); } - Image _addText(ScreenshotLayout layout, String title, String subtitle) { - final titleFont = BitmapFont.fromZip(File(layout.titleFontPath).readAsBytesSync()); - final subtitleFont = BitmapFont.fromZip(File(layout.subtitleFontPath).readAsBytesSync()); + Image _addText(ScreenshotLayout layout, String title, String subtitle, {required bool isDark}) { + final titleFont = + BitmapFont.fromZip(File(isDark ? layout.titleFontDarkPath : layout.titleFontPath).readAsBytesSync()); + final subtitleFont = + BitmapFont.fromZip(File(isDark ? layout.subtitleFontDarkPath : layout.subtitleFontPath).readAsBytesSync()); final textImage = fill( Image( height: titleFont.lineHeight + 36 + subtitleFont.lineHeight * 2, diff --git a/screenshots/models/screenshot_layout.dart b/screenshots/models/screenshot_layout.dart index eed1e28..f18ce87 100644 --- a/screenshots/models/screenshot_layout.dart +++ b/screenshots/models/screenshot_layout.dart @@ -17,6 +17,9 @@ enum ScreenshotLayout { final String titleFontPath; final String subtitleFontPath; + String get titleFontDarkPath => '${titleFontPath.split('.').first}-dark.zip'; + String get subtitleFontDarkPath => '${subtitleFontPath.split('.').first}-dark.zip'; + const ScreenshotLayout({ required this.size, required this.contentPadding,