I want to load custom font i my app.
I try this
- Create a assets/fonts where you can find the fonts i want to use
- I add rnmp in the package.json like that : "rnmp": { "assets": ["./assets/fonts/"] }
- I link like that: react-native link
Then i use my font like that : fontFamily: "Lato-Light",
{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "eject": "expo eject" }, "dependencies": { "expo": "^32.0.6", "react": "16.5.0", "react-native": "https://github.com/expo/react-native/archive/sdk- 32.0.0.tar.gz", "react-navigation": "^3.11.0" }, "devDependencies": { "babel-preset-expo": "^5.0.0" }, "rnmp": { "assets": ["./assets/fonts/"] }, "private": true }
The font should be load but i get this error :
"fontFamily" "Lato-Light" is not a system font and has not been loaded through Font.loadAsync