Custom fonts in React-Native

Adding custom fonts to the Indigenous React App is very easy and requires only a few steps. I write down the steps I have taken to add custom fonts to my app.

Create a font folder in your src / assets folder and paste the downloaded file fonts into it.

your assets folder

Now create a file named react-native.config.js at the root of your app and add a font style like this.

your root file react-native.config.js

To link these fonts to your project, run “npx react-native link” in your project folder.

The link will add the font files to the assets folder in the Android folder of your app and the info.plist file to the iOS folder.

At this point, your custom fonts will start working on the Android app but you need to take one last step to run on iOS.

Navigate to your preferred target targets in Xcode, select the Build Categories tab, and add the font files to “Copy Bundle Resources”.

Enjoy your new fonts. 🎉 🎊

You are welcome to share your thoughts in the comments.