React Native fonts don`t work
See original GitHub issuereact-native info: System: OS: macOS 10.15.6 CPU: (2) x64 Intel® Core™2 Duo CPU P8600 @ 2.40GHz Memory: 59.32 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.1 - /usr/local/bin/node Yarn: Not Found npm: 6.14.8 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 12.1/12A7403 - /usr/bin/xcodebuild Languages: Java: Not Found Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 npmGlobalPackages: react-native: Not Found
Steps:
-
Download any font family
-
Create react-native.config.js
-
Insert there
module.exports = { assets: ['./src/fonts'] }
-
run react-native link
-
Get success message: info Linking assets to ios project info Linking assets to android project success Assets have been successfully linked to your project
-
react-native run-ios (iOS v: 13.1 && iphone 8)
-
Get this error => https://ibb.co/TYYXV4G - Unrecognized Font Family ‘Montserrat Family’
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Have you checked the font in Font-book’s name? Font names on iOS devices are sometimes not the same as the file name. Open the font in font-book and use the PostScript’s name instead of the file name.
From #25852
Can you provide more info on your repro? There’s no detail of how you’re referring to the font. A link to a repo with a minimized repro would help. The set of steps you’re following at a glance sound the same as say this guide, but there may be some difference.