0
votes

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/'], 
};

Screenshot:- enter image description here

1
have you checked this medium.com/@kswanie21/…Gaurav Roy
@GauravRoy thanku for your reply. I tried this one medium.com/@kswanie21/… but no use.Harika
have you tried the third step of adding fonts in bundle resources in xcode?Gaurav Roy
s i did but getting same error...Harika

1 Answers

1
votes

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