I\'ve added Linux Biolinum fonts (http://www.dafont.com/linux-biolinum.font, LinBiolinum_R.ttf, LinBiolinum_RB.ttf) to my React Native project. Android version is OK. But on
I had the same issue and fixed it by just opening the project in Xcode and under Resources folder in Project Navigator, there were duplicate fonts and just removing them from Resources folder and Info.plist both, the issue got resolved. Just run the app in Xcode after deletion then you may verify in your other tools as well without reinstalling npm. Just run 'react-native run-ios', cheers :)
I renamed the font files and re-ran react-native link
and ended up in this state.
I resolved it by ensuring the old fonts were removed from the Resources folder and Info.plist
and then ran the build again.
In App.js file just import the missing font family and load the font as below
import Feather from 'react-native-vector-icons/Feather'
Feather.loadFont();
You can find these fonts in your project folder
Path - Project->node-modules-react-native-vector-icons->Fonts
Check this tested and works fine
Hope this helps!!
If you are running react-native ios simulator, you should include fonts in the xcode project directory.
react-native link react-native-vector-icons doing so , will add the fonts to Resources folder in xcode project and also add fonts to pinfo list.
In my case, it worked fine in Android but not in iOS. The font file name was PlayfairDisplay-VariableFont_wght.ttf
. But when I opened that file I saw the name as:
.
So, I changed the file name to PlayfairDisplay-Regular.ttf
and it worked pretty well!
Implement the following code in your appdelegate file
for (NSString* family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(@"Family name: %@", name);
}
}
You should use FONT FAMILY NAME instead of your font file name like the following
fontFamily: "FuturaBT-Book"