{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/18025","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/18025/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/18025/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/18025/events","html_url":"https://github.com/facebook/react-native/issues/18025","id":298406873,"number":18025,"title":"Custom fonts won't load on tvOS apps - Unrecognized font family","user":{"login":"natestone","id":4010562,"avatar_url":"https://avatars0.githubusercontent.com/u/4010562?v=4","gravatar_id":"","url":"https://api.github.com/users/natestone","html_url":"https://github.com/natestone","followers_url":"https://api.github.com/users/natestone/followers","following_url":"https://api.github.com/users/natestone/following{/other_user}","gists_url":"https://api.github.com/users/natestone/gists{/gist_id}","starred_url":"https://api.github.com/users/natestone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natestone/subscriptions","organizations_url":"https://api.github.com/users/natestone/orgs","repos_url":"https://api.github.com/users/natestone/repos","events_url":"https://api.github.com/users/natestone/events{/privacy}","received_events_url":"https://api.github.com/users/natestone/received_events","type":"User","site_admin":false},"labels":[{"id":857177693,"url":"https://api.github.com/repos/facebook/react-native/labels/tvOS%20:tv:","name":"tvOS :tv:","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-19T21:34:18Z","updated_at":"2018-03-12T08:21:02Z","closed_at":null,"author_association":"NONE","body":"\r\n### Is this a bug report?\r\n\r\nYes\r\n\r\n### Have you read the [Contributing Guidelines](https://facebook.github.io/react-native/docs/contributing.html)?\r\n\r\nYes\r\n\r\n### Environment\r\n\r\nEnvironment:\r\n  OS: macOS High Sierra 10.13.2\r\n  Node: 8.9.4\r\n  Yarn: Not Found\r\n  npm: 5.6.0\r\n  Watchman: 4.9.0\r\n  Xcode: Xcode 9.2 Build version 9C40b\r\n  Android Studio: Not Found\r\n\r\nPackages: (wanted => installed)\r\n  react: 16.2.0 => 16.2.0\r\n  react-native: 0.53.2 => 0.53.2\r\n\r\n\r\n### Steps to Reproduce\r\n\r\n1. Create new project using `react-native init AwesomeProject\r\n2. Create folder:   resources/fonts \r\n3. Add rnpm settings to package.json to link fonts:\r\n```\r\n  \"rnpm\": {\r\n    \"assets\": [\r\n      \"resources/fonts\"\r\n    ]\r\n  },\r\n```\r\n4. 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\r\n5. run `react-native link`\r\n6. Modify App.js to utilize new font (Lines 48-53):\r\n```\r\n  welcome: {\r\n    fontSize: 20,\r\n    textAlign: 'center',\r\n    margin: 10,\r\n    fontFamily: 'BioRhymeExpanded-Regular'\r\n  },\r\n```\r\n7. Open XCode and run on iOS Simulator and on tvOS simulator\r\n### Expected Behavior\r\n\r\n<!--\r\n  How did you expect your project to behave?\r\n  It’s fine if you’re not sure your understanding is correct.\r\n  Just write down what you thought would happen.\r\n-->\r\n\r\nWe should see the \"Welcome to React Native\" heading rendered using the new font in both iOS and tvOS apps.\r\n\r\n### Actual Behavior\r\n\r\nWe 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.\r\n\r\nWorking iOS\r\n![ios_working](https://user-images.githubusercontent.com/4010562/36397450-d66533b0-1590-11e8-963d-12248e40d5a0.png)\r\n\r\nBusted tvOS\r\n![tvos_busted](https://user-images.githubusercontent.com/4010562/36397442-ccbab7c2-1590-11e8-990d-4e5fd614b753.png)\r\n\r\nEssentially, 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).\r\n\r\n### Reproducible Demo\r\n\r\nhttps://gist.github.com/natestone/69b04c8725ef39893c3c5d1a7ca9f7f7\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/372226327","html_url":"https://github.com/facebook/react-native/issues/18025#issuecomment-372226327","issue_url":"https://api.github.com/repos/facebook/react-native/issues/18025","id":372226327,"user":{"login":"psegalen","id":3963529,"avatar_url":"https://avatars0.githubusercontent.com/u/3963529?v=4","gravatar_id":"","url":"https://api.github.com/users/psegalen","html_url":"https://github.com/psegalen","followers_url":"https://api.github.com/users/psegalen/followers","following_url":"https://api.github.com/users/psegalen/following{/other_user}","gists_url":"https://api.github.com/users/psegalen/gists{/gist_id}","starred_url":"https://api.github.com/users/psegalen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psegalen/subscriptions","organizations_url":"https://api.github.com/users/psegalen/orgs","repos_url":"https://api.github.com/users/psegalen/repos","events_url":"https://api.github.com/users/psegalen/events{/privacy}","received_events_url":"https://api.github.com/users/psegalen/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T08:21:02Z","updated_at":"2018-03-12T08:21:02Z","author_association":"NONE","body":"I have custom font on tvOS, I remember running in some issues but finally made it work.\r\nCheck the following:\r\n- The fonts are listed in your Info.plist \"Fonts provided by application\" section;\r\n- Your tvOS target is correctly using this Info.plist file; (I think it was my problem)\r\n- The tvOS target config \"Build Phases\" tab has your *.ttf files added in the \"Copy Bundle Resources\" section."}}
{"actor":{"display_login":"psegalen"}}