diff --git a/android/app/src/main/assets/fonts/Whitney-Book-Pro.otf b/android/app/src/main/assets/fonts/Whitney-Book-Pro.otf new file mode 100644 index 000000000..f50bc45e2 Binary files /dev/null and b/android/app/src/main/assets/fonts/Whitney-Book-Pro.otf differ diff --git a/android/app/src/main/assets/fonts/Whitney-BookItalic-Pro.otf b/android/app/src/main/assets/fonts/Whitney-BookItalic-Pro.otf new file mode 100644 index 000000000..7b3fae7be Binary files /dev/null and b/android/app/src/main/assets/fonts/Whitney-BookItalic-Pro.otf differ diff --git a/android/app/src/main/assets/fonts/Whitney-Light-Pro.otf b/android/app/src/main/assets/fonts/Whitney-Light-Pro.otf new file mode 100644 index 000000000..51c377204 Binary files /dev/null and b/android/app/src/main/assets/fonts/Whitney-Light-Pro.otf differ diff --git a/android/app/src/main/assets/fonts/Whitney-Medium-Pro.otf b/android/app/src/main/assets/fonts/Whitney-Medium-Pro.otf new file mode 100644 index 000000000..f10996527 Binary files /dev/null and b/android/app/src/main/assets/fonts/Whitney-Medium-Pro.otf differ diff --git a/android/app/src/main/assets/fonts/Whitney-Semibold-Pro.otf b/android/app/src/main/assets/fonts/Whitney-Semibold-Pro.otf new file mode 100644 index 000000000..d926fefc3 Binary files /dev/null and b/android/app/src/main/assets/fonts/Whitney-Semibold-Pro.otf differ diff --git a/android/app/src/main/assets/fonts/Whitney-SemiboldItalic-Pro.otf b/android/app/src/main/assets/fonts/Whitney-SemiboldItalic-Pro.otf new file mode 100644 index 000000000..5f6d06972 Binary files /dev/null and b/android/app/src/main/assets/fonts/Whitney-SemiboldItalic-Pro.otf differ diff --git a/android/link-assets-manifest.json b/android/link-assets-manifest.json new file mode 100644 index 000000000..bb81b423e --- /dev/null +++ b/android/link-assets-manifest.json @@ -0,0 +1,29 @@ +{ + "migIndex": 1, + "data": [ + { + "path": "assets/fonts/Whitney-Book-Pro.otf", + "sha1": "639b8a8bf3e1cc3de30d0f49e666aca3999ca65a" + }, + { + "path": "assets/fonts/Whitney-BookItalic-Pro.otf", + "sha1": "15854f60175a0e82b794c259431ec45ea4b40103" + }, + { + "path": "assets/fonts/Whitney-Light-Pro.otf", + "sha1": "d15560faea2b18aef9867a1d2b9e2efb54b17b5b" + }, + { + "path": "assets/fonts/Whitney-Medium-Pro.otf", + "sha1": "33ca073c11f46dc266a7dc1adeaa102891bd76d1" + }, + { + "path": "assets/fonts/Whitney-Semibold-Pro.otf", + "sha1": "7a107095a453c8cd8046d9ccded5d88e6809e89f" + }, + { + "path": "assets/fonts/Whitney-SemiboldItalic-Pro.otf", + "sha1": "53e8a56ceb630b63316db41017125c52fbf0e845" + } + ] +} diff --git a/assets/fonts/Whitney-Book-Pro.otf b/assets/fonts/Whitney-Book-Pro.otf new file mode 100644 index 000000000..f50bc45e2 Binary files /dev/null and b/assets/fonts/Whitney-Book-Pro.otf differ diff --git a/assets/fonts/Whitney-BookItalic-Pro.otf b/assets/fonts/Whitney-BookItalic-Pro.otf new file mode 100644 index 000000000..7b3fae7be Binary files /dev/null and b/assets/fonts/Whitney-BookItalic-Pro.otf differ diff --git a/assets/fonts/Whitney-Light-Pro.otf b/assets/fonts/Whitney-Light-Pro.otf new file mode 100644 index 000000000..51c377204 Binary files /dev/null and b/assets/fonts/Whitney-Light-Pro.otf differ diff --git a/assets/fonts/Whitney-Medium-Pro.otf b/assets/fonts/Whitney-Medium-Pro.otf new file mode 100644 index 000000000..f10996527 Binary files /dev/null and b/assets/fonts/Whitney-Medium-Pro.otf differ diff --git a/assets/fonts/Whitney-Semibold-Pro.otf b/assets/fonts/Whitney-Semibold-Pro.otf new file mode 100644 index 000000000..d926fefc3 Binary files /dev/null and b/assets/fonts/Whitney-Semibold-Pro.otf differ diff --git a/assets/fonts/Whitney-SemiboldItalic-Pro.otf b/assets/fonts/Whitney-SemiboldItalic-Pro.otf new file mode 100644 index 000000000..5f6d06972 Binary files /dev/null and b/assets/fonts/Whitney-SemiboldItalic-Pro.otf differ diff --git a/ios/iNaturalistReactNative.xcodeproj/project.pbxproj b/ios/iNaturalistReactNative.xcodeproj/project.pbxproj index 3ad32e4ee..d113fb8bb 100644 --- a/ios/iNaturalistReactNative.xcodeproj/project.pbxproj +++ b/ios/iNaturalistReactNative.xcodeproj/project.pbxproj @@ -12,7 +12,13 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 829672AB5DD3412FB120DE40 /* Whitney-BookItalic-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = B5359D98B3384738A8ED6C74 /* Whitney-BookItalic-Pro.otf */; }; + A252B2AEA64E47C9AC1D20E8 /* Whitney-Light-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA9D41ECEBFA4C38B74009B3 /* Whitney-Light-Pro.otf */; }; + B5241D089ADB4290B5566898 /* Whitney-Semibold-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = C6C5CABEB9CB44B5ABF940A8 /* Whitney-Semibold-Pro.otf */; }; + BA2479FA3D7B40A7BEF7B3CD /* Whitney-Medium-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = D09FA3A0162844FF80A5EF96 /* Whitney-Medium-Pro.otf */; }; C15FC29A57139D5E79AEE225 /* libPods-iNaturalistReactNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 94E8E83754985D3480D4250B /* libPods-iNaturalistReactNative.a */; }; + C8EEAD27B69C424BAB2EB23F /* Whitney-SemiboldItalic-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = A788948E590442F385C5FD6C /* Whitney-SemiboldItalic-Pro.otf */; }; + CF25D941972D42BDBBD309E0 /* Whitney-Book-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8860EC2616494880B36297C2 /* Whitney-Book-Pro.otf */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,7 +43,13 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iNaturalistReactNative/main.m; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = iNaturalistReactNative/LaunchScreen.storyboard; sourceTree = ""; }; 82C3EA8411717C12B2D638F0 /* Pods-iNaturalistReactNative.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iNaturalistReactNative.debug.xcconfig"; path = "Target Support Files/Pods-iNaturalistReactNative/Pods-iNaturalistReactNative.debug.xcconfig"; sourceTree = ""; }; + 8860EC2616494880B36297C2 /* Whitney-Book-Pro.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Whitney-Book-Pro.otf"; path = "../assets/fonts/Whitney-Book-Pro.otf"; sourceTree = ""; }; 94E8E83754985D3480D4250B /* libPods-iNaturalistReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-iNaturalistReactNative.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A788948E590442F385C5FD6C /* Whitney-SemiboldItalic-Pro.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Whitney-SemiboldItalic-Pro.otf"; path = "../assets/fonts/Whitney-SemiboldItalic-Pro.otf"; sourceTree = ""; }; + B5359D98B3384738A8ED6C74 /* Whitney-BookItalic-Pro.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Whitney-BookItalic-Pro.otf"; path = "../assets/fonts/Whitney-BookItalic-Pro.otf"; sourceTree = ""; }; + BA9D41ECEBFA4C38B74009B3 /* Whitney-Light-Pro.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Whitney-Light-Pro.otf"; path = "../assets/fonts/Whitney-Light-Pro.otf"; sourceTree = ""; }; + C6C5CABEB9CB44B5ABF940A8 /* Whitney-Semibold-Pro.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Whitney-Semibold-Pro.otf"; path = "../assets/fonts/Whitney-Semibold-Pro.otf"; sourceTree = ""; }; + D09FA3A0162844FF80A5EF96 /* Whitney-Medium-Pro.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Whitney-Medium-Pro.otf"; path = "../assets/fonts/Whitney-Medium-Pro.otf"; sourceTree = ""; }; E6BB4561D9EBE3B509576120 /* Pods-iNaturalistReactNative.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iNaturalistReactNative.release.xcconfig"; path = "Target Support Files/Pods-iNaturalistReactNative/Pods-iNaturalistReactNative.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -125,6 +137,7 @@ 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, 3610B9F08DA0E49FEE702ABA /* Pods */, + E7A0E0AA690545D78AA7CC73 /* Resources */, ); indentWidth = 2; sourceTree = ""; @@ -140,6 +153,20 @@ name = Products; sourceTree = ""; }; + E7A0E0AA690545D78AA7CC73 /* Resources */ = { + isa = PBXGroup; + children = ( + 8860EC2616494880B36297C2 /* Whitney-Book-Pro.otf */, + B5359D98B3384738A8ED6C74 /* Whitney-BookItalic-Pro.otf */, + BA9D41ECEBFA4C38B74009B3 /* Whitney-Light-Pro.otf */, + D09FA3A0162844FF80A5EF96 /* Whitney-Medium-Pro.otf */, + C6C5CABEB9CB44B5ABF940A8 /* Whitney-Semibold-Pro.otf */, + A788948E590442F385C5FD6C /* Whitney-SemiboldItalic-Pro.otf */, + ); + name = Resources; + path = ""; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -232,6 +259,12 @@ files = ( 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + CF25D941972D42BDBBD309E0 /* Whitney-Book-Pro.otf in Resources */, + 829672AB5DD3412FB120DE40 /* Whitney-BookItalic-Pro.otf in Resources */, + A252B2AEA64E47C9AC1D20E8 /* Whitney-Light-Pro.otf in Resources */, + BA2479FA3D7B40A7BEF7B3CD /* Whitney-Medium-Pro.otf in Resources */, + B5241D089ADB4290B5566898 /* Whitney-Semibold-Pro.otf in Resources */, + C8EEAD27B69C424BAB2EB23F /* Whitney-SemiboldItalic-Pro.otf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/iNaturalistReactNative/Info.plist b/ios/iNaturalistReactNative/Info.plist index c6516ac11..8d28934b8 100644 --- a/ios/iNaturalistReactNative/Info.plist +++ b/ios/iNaturalistReactNative/Info.plist @@ -51,6 +51,12 @@ MaterialCommunityIcons.ttf MaterialIcons.ttf + Whitney-Book-Pro.otf + Whitney-BookItalic-Pro.otf + Whitney-Light-Pro.otf + Whitney-Medium-Pro.otf + Whitney-Semibold-Pro.otf + Whitney-SemiboldItalic-Pro.otf UILaunchStoryboardName LaunchScreen diff --git a/ios/link-assets-manifest.json b/ios/link-assets-manifest.json new file mode 100644 index 000000000..bb81b423e --- /dev/null +++ b/ios/link-assets-manifest.json @@ -0,0 +1,29 @@ +{ + "migIndex": 1, + "data": [ + { + "path": "assets/fonts/Whitney-Book-Pro.otf", + "sha1": "639b8a8bf3e1cc3de30d0f49e666aca3999ca65a" + }, + { + "path": "assets/fonts/Whitney-BookItalic-Pro.otf", + "sha1": "15854f60175a0e82b794c259431ec45ea4b40103" + }, + { + "path": "assets/fonts/Whitney-Light-Pro.otf", + "sha1": "d15560faea2b18aef9867a1d2b9e2efb54b17b5b" + }, + { + "path": "assets/fonts/Whitney-Medium-Pro.otf", + "sha1": "33ca073c11f46dc266a7dc1adeaa102891bd76d1" + }, + { + "path": "assets/fonts/Whitney-Semibold-Pro.otf", + "sha1": "7a107095a453c8cd8046d9ccded5d88e6809e89f" + }, + { + "path": "assets/fonts/Whitney-SemiboldItalic-Pro.otf", + "sha1": "53e8a56ceb630b63316db41017125c52fbf0e845" + } + ] +} diff --git a/package-lock.json b/package-lock.json index 343c76a00..e8c9da51f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16627,6 +16627,7 @@ "@realm.io/common": "^0.1.4", "bindings": "^1.5.0", "bson": "4.4.1", + "clang-format": "^1.6.0", "command-line-args": "^5.1.1", "deepmerge": "2.1.0", "fs-extra": "^4.0.3", @@ -16649,7 +16650,7 @@ "npm": ">=7" }, "peerDependencies": { - "react-native": ">=0.64" + "react-native": ">=0.66.0" }, "peerDependenciesMeta": { "react-native": { @@ -31799,6 +31800,7 @@ "@realm.io/common": "^0.1.4", "bindings": "^1.5.0", "bson": "4.4.1", + "clang-format": "^1.6.0", "command-line-args": "^5.1.1", "deepmerge": "2.1.0", "fs-extra": "^4.0.3", diff --git a/react-native.config.js b/react-native.config.js index 96e30b04c..252970ce3 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -5,5 +5,6 @@ module.exports = { android: null // disable Android platform, other platforms will still autolink if provided } } - } + }, + assets: ["./assets/fonts/"] }; diff --git a/src/components/styledComponents.js b/src/components/styledComponents.js index 30835b91e..4682f8069 100644 --- a/src/components/styledComponents.js +++ b/src/components/styledComponents.js @@ -4,6 +4,7 @@ import { styled } from "nativewind"; import { Image as StyledImage, KeyboardAvoidingView as StyledKeyboardAvoidingView, + Platform, Pressable as StyledPressable, SafeAreaView as StyledSafeAreaView, ScrollView as StyledScrollView, @@ -21,7 +22,15 @@ const SafeAreaView = styled( StyledSafeAreaView ); // $FlowIgnore const ScrollView = styled( StyledScrollView ); // $FlowIgnore -const Text = styled( StyledText ); +const HeaderText = styled( + StyledText, + Platform.OS === "ios" ? "font-Papyrus-Condensed" : "font-Roboto" +); +// $FlowIgnore +const Text = styled( + StyledText, + Platform.OS === "ios" ? "font-Whitney-Medium" : "font-Whitney-Medium-Pro" +); // $FlowIgnore const TextInput = styled( StyledTextInput ); // $FlowIgnore @@ -30,6 +39,7 @@ const Pressable = styled( StyledPressable ); const Image = styled( StyledImage ); export { + HeaderText, Image, KeyboardAvoidingView, Pressable, diff --git a/tailwind.config.js b/tailwind.config.js index 38966d33d..4ffdcfe68 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -13,6 +13,15 @@ module.exports = { extend: { height: { 22: "5.5rem" + }, + fontFamily: { + "Whitney-Medium": ["Whitney-Medium"], + "Whitney-Medium-Pro": ["Whitney-Medium-Pro"], // Android naming convention + "Whitney-Light": ["Whitney-Light"], + // selected from list of fonts already available in RN + // https://infinitbility.com/react-native-font-family-list/ + "Papyrus-Condensed": ["Papyrus-Condensed"], + Roboto: ["Roboto"] } }, colors: {