2
votes

I would like add custom font family on my React Native App on iOS. I've no problem with Android, but i've an error in iOS :

Unrecognized font family 'dinproRegular'

I've use this link for setup my font, but no result.

File name : dinproRegular.ttf

Call in react-native : fontFamily: "dinproRegular" // Test with "Dinpro Regular" too

No result :(

Anyone have idea ?

2

2 Answers

1
votes
0
votes

In iOS, you can see what font name you should use in code to let it work Use below code in AppDelegate.m to get all font names supported in your app.

for (NSString* family in [UIFont familyNames])
  {
    NSLog(@"%@", family);
    for (NSString* name in [UIFont fontNamesForFamilyName: family])
    {
      NSLog(@" %@", name);
    }
  }