Skip to content

Commit

Permalink
Shipping Roboto with app, will be followed with refactor of all Text …
Browse files Browse the repository at this point in the history
…components

Signed-off-by: sarthakpranesh <[email protected]>
  • Loading branch information
sarthakpranesh committed Feb 26, 2021
1 parent 9473975 commit 84ad765
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
Binary file added android/app/src/main/assets/fonts/Roboto.ttf
Binary file not shown.
Binary file added assets/fonts/Roboto.ttf
Binary file not shown.
13 changes: 13 additions & 0 deletions ios/Covid19.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
532300D4F8F699C12823E541 /* libPods-Covid19-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 20E87AB8D71BCA79511B2BE2 /* libPods-Covid19-tvOS.a */; };
5D21585B4E63FEDD5AEC52A6 /* libPods-Covid19-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F36DD8C15EA40E9456E80F4 /* libPods-Covid19-tvOSTests.a */; };
C6CFAE429979F54D36C0FF4D /* libPods-Covid19.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 762F95E59FF98242EABC7501 /* libPods-Covid19.a */; };
764EB80327874FE29083F3A8 /* Roboto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B876A41F8A794234A50A64AC /* Roboto.ttf */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -70,6 +71,7 @@
B8E2B16BAD142AA7B8726E79 /* Pods-Covid19-Covid19Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Covid19-Covid19Tests.debug.xcconfig"; path = "Target Support Files/Pods-Covid19-Covid19Tests/Pods-Covid19-Covid19Tests.debug.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
B876A41F8A794234A50A64AC /* Roboto.ttf */ = {isa = PBXFileReference; name = "Roboto.ttf"; path = "../assets/fonts/Roboto.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -170,6 +172,7 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
EF5133489B4F6D66858FBDB2 /* Pods */,
924ED0F36EBF45A9BFA10EE0 /* Resources */,
);
indentWidth = 2;
sourceTree = "<group>";
Expand Down Expand Up @@ -202,6 +205,15 @@
path = Pods;
sourceTree = "<group>";
};
924ED0F36EBF45A9BFA10EE0 /* Resources */ = {
isa = "PBXGroup";
children = (
B876A41F8A794234A50A64AC /* Roboto.ttf */,
);
name = Resources;
sourceTree = "<group>";
path = "";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -347,6 +359,7 @@
files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
764EB80327874FE29083F3A8 /* Roboto.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
5 changes: 2 additions & 3 deletions ios/Covid19/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string>Covid19 requires to access your location to fetch stats</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -54,8 +54,7 @@
<key>UIAppFonts</key>
<array>
<string>Feather.ttf</string>
<string>Roboto.ttf</string>
</array>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Covid19 requires to access your location to fetch stats</string>
</dict>
</plist>
3 changes: 3 additions & 0 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
assets: ['./assets/fonts']
}
6 changes: 3 additions & 3 deletions src/Layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export default {
width,
height
},
largeScreenBreak: 720,
largeScreenBreak: 992, // large screen devices like laptops or desktops
smallScreenBreak: 375,
fontScale: width > 720 ? width / 720 : width / 375,
fontScale: width > 992 ? 1.8 : (width / 375) + 0.2,
isSmallDevice: width < 375,
isLargeDevice: width > 720
isLargeDevice: width > 992
}
6 changes: 2 additions & 4 deletions src/navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@ const RootNavigator = (props: RootNavigatorProps) => {
left: 10,
borderRadius: 8,
elevation: 8,
zIndex: 100
zIndex: 999
}}
onPress={() => navigation.toggleDrawer()}
>
<Menu
style={{
margin: 8,
scaleX: scale,
scaleY: scale
margin: 8
}}
color="black"
/>
Expand Down

0 comments on commit 84ad765

Please sign in to comment.