Description
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.4
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.2 => 0.53.2
Steps to Reproduce
- Create new project using `react-native init AwesomeProject
- Create folder: resources/fonts
- Add rnpm settings to package.json to link fonts:
"rnpm": {
"assets": [
"resources/fonts"
]
},
- Download and add a custom font to
resources/fonts
(I used BioRhymeExpanded-Regular.ttf in this example - available at https://fonts.google.com/specimen/BioRhyme+Expanded - run
react-native link
- Modify App.js to utilize new font (Lines 48-53):
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
fontFamily: 'BioRhymeExpanded-Regular'
},
- Open XCode and run on iOS Simulator and on tvOS simulator
Expected Behavior
We should see the "Welcome to React Native" heading rendered using the new font in both iOS and tvOS apps.
Actual Behavior
We get Unrecognized font family 'BioRhymeExpanded-Regular'
when running tvOS (on either AppleTV 4k or AppleTV 4k at 1080p). iOS apps display the correct/expected output.
Essentially, tvOS apps are not loading custom fonts. Additionally, noticed that font files did not have tvOS targets, but correcting this had no effect (even after clean, shutdown and restart of packager, and rebuild).
Reproducible Demo
https://gist.github.com/natestone/69b04c8725ef39893c3c5d1a7ca9f7f7