Skip to content

Commit

Permalink
Link custom font to native layer
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Aug 12, 2020
1 parent 8e9bbcb commit caad195
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 19 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed assets/fonts/Fabriga Black.otf
Binary file not shown.
Binary file removed assets/fonts/Fabriga-Regular.otf
Binary file not shown.
Binary file added assets/fonts/GTAmericaExp-Bold.otf
Binary file not shown.
Binary file added assets/fonts/GTAmericaExp-Light.otf
Binary file not shown.
Binary file added assets/fonts/GTAmericaExp-Medium.otf
Binary file not shown.
Binary file added assets/fonts/GTAmericaExp-Regular.otf
Binary file not shown.
Binary file added assets/fonts/GTAmericaExp-Thin.otf
Binary file not shown.
29 changes: 29 additions & 0 deletions ios/ReactNativeChat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
46C9221F3EA3DD84BD134825 /* libPods-ReactNativeChat-ReactNativeChatTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 074C00650065A406EE912586 /* libPods-ReactNativeChat-ReactNativeChatTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
EB699F7A1A5F6AF391540E98 /* libPods-ReactNativeChat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D428799B67913B9C601A158 /* libPods-ReactNativeChat.a */; };
11FA3546D54246CD8F819152 /* GTAmericaExp-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = A5AAD008CBD84A6CAEB9AC97 /* GTAmericaExp-Bold.otf */; };
49F157C845CE4D56AA72B80E /* GTAmericaExp-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 67D5C3A6A7FA417C8A853FC1 /* GTAmericaExp-Light.otf */; };
CC07911F22C2437DA6708BD2 /* GTAmericaExp-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = AE65058949E14DA5A2D5435D /* GTAmericaExp-Medium.otf */; };
4912B60FA66C4604A56AD575 /* GTAmericaExp-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8C7003903C1E4957824899BB /* GTAmericaExp-Regular.otf */; };
7F7721B764D444D6861A9B39 /* GTAmericaExp-Thin.otf in Resources */ = {isa = PBXBuildFile; fileRef = A292718541C841859D97DF2F /* GTAmericaExp-Thin.otf */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -46,6 +51,11 @@
D232EFF53A6330C07E8BC0F8 /* Pods-ReactNativeChat.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeChat.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeChat/Pods-ReactNativeChat.release.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; };
A5AAD008CBD84A6CAEB9AC97 /* GTAmericaExp-Bold.otf */ = {isa = PBXFileReference; name = "GTAmericaExp-Bold.otf"; path = "../assets/fonts/GTAmericaExp-Bold.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
67D5C3A6A7FA417C8A853FC1 /* GTAmericaExp-Light.otf */ = {isa = PBXFileReference; name = "GTAmericaExp-Light.otf"; path = "../assets/fonts/GTAmericaExp-Light.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
AE65058949E14DA5A2D5435D /* GTAmericaExp-Medium.otf */ = {isa = PBXFileReference; name = "GTAmericaExp-Medium.otf"; path = "../assets/fonts/GTAmericaExp-Medium.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
8C7003903C1E4957824899BB /* GTAmericaExp-Regular.otf */ = {isa = PBXFileReference; name = "GTAmericaExp-Regular.otf"; path = "../assets/fonts/GTAmericaExp-Regular.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
A292718541C841859D97DF2F /* GTAmericaExp-Thin.otf */ = {isa = PBXFileReference; name = "GTAmericaExp-Thin.otf"; path = "../assets/fonts/GTAmericaExp-Thin.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -126,6 +136,7 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
EC29677F0A49C2946A495A33 /* Pods */,
A9EA265D209D4558995C9BD4 /* Resources */,
);
indentWidth = 2;
sourceTree = "<group>";
Expand All @@ -152,6 +163,19 @@
path = Pods;
sourceTree = "<group>";
};
A9EA265D209D4558995C9BD4 /* Resources */ = {
isa = "PBXGroup";
children = (
A5AAD008CBD84A6CAEB9AC97 /* GTAmericaExp-Bold.otf */,
67D5C3A6A7FA417C8A853FC1 /* GTAmericaExp-Light.otf */,
AE65058949E14DA5A2D5435D /* GTAmericaExp-Medium.otf */,
8C7003903C1E4957824899BB /* GTAmericaExp-Regular.otf */,
A292718541C841859D97DF2F /* GTAmericaExp-Thin.otf */,
);
name = Resources;
sourceTree = "<group>";
path = "";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -249,6 +273,11 @@
files = (
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
11FA3546D54246CD8F819152 /* GTAmericaExp-Bold.otf in Resources */,
49F157C845CE4D56AA72B80E /* GTAmericaExp-Light.otf in Resources */,
CC07911F22C2437DA6708BD2 /* GTAmericaExp-Medium.otf in Resources */,
4912B60FA66C4604A56AD575 /* GTAmericaExp-Regular.otf in Resources */,
7F7721B764D444D6861A9B39 /* GTAmericaExp-Thin.otf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
10 changes: 9 additions & 1 deletion ios/ReactNativeChat/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -64,5 +64,13 @@
<false/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>UIAppFonts</key>
<array>
<string>GTAmericaExp-Bold.otf</string>
<string>GTAmericaExp-Light.otf</string>
<string>GTAmericaExp-Medium.otf</string>
<string>GTAmericaExp-Regular.otf</string>
<string>GTAmericaExp-Thin.otf</string>
</array>
</dict>
</plist>
7 changes: 7 additions & 0 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
};
2 changes: 1 addition & 1 deletion src/style/StyleSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const styles = {
borderColor: colors.border,
borderWidth: 1,
color: colors.text,
fontFamily: 'GT-America-Standard',
fontFamily: 'GTAmericaExp-Regular',
padding: 12,
},

Expand Down
16 changes: 0 additions & 16 deletions src/style/fontFamily/index.ios.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/style/fontFamily/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fontFamily = {
GTA: {
fontFamily: 'GT-America-Standard',
fontFamily: 'GTAmericaExp-Regular',
},
};

Expand Down

0 comments on commit caad195

Please sign in to comment.