Reputation: 1131
i am using fonts in my app. So i need to add the font din-next-lt-w23-regular in my app. But i am getting error in iOS i.e., Unrecognized font family 'din-next-lt-w23-regular'
. I added .ttf files in ios/Resources and info.plist.
Here is my code
react-native.config.js
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
};
Upvotes: 0
Views: 321
Reputation: 2464
Check the PostScript name of the font, it is what IOS uses to recognize fonts. You can check the postscript name of a font file in Font book.
Here is a good guide to add fonts to react-native https://medium.com/@mehran.khan/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4
Upvotes: 1