Harika
Harika

Reputation: 1131

Getting error Unrecognized font family 'din-next-lt-w23-regular' in react-native 0.61.4 only for iOS

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

Upvotes: 0

Views: 321

Answers (1)

B. Mohammad
B. Mohammad

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

Related Questions