UPDATE
Many answers are here for adding custom font in react-native for version < 0.60.
For those who are using react-native version > 0.60 , 'rnpm' is deprecated
and custom fonts will not work.
Now, in order to add custom font in react-native version > 0.60 you will have to :
1- Create a file named react-native.config.js
in the root folder of your project.
2- add this in that new file
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts']
};
3- run react-native link
command in the root project path.
PS Make sure you have the right path for the fonts folder before running react-native link
command
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…