How to install custom fonts in your react native application

  • Search for the desired font. You can find some at fonts.google.com

  • Download the package and install it on your local machine

  • Create an assets folder in the root of your React native application

  • Create a fonts folder inside the assets folder and move all the files from the static folder in your downloaded package into the fonts folder in your application

  • Create a react-native.config.js file in the root of your application and add the following code

      module.exports = {
        project:
          ios: {},
          android: {},
        },
        assets: [‘./assets/fonts/’]
      };
    
  • Navigate to your project root in your terminal and run

      npx react-native-asset
    
  • Thats it! The font should be available for use in the project.

0
Subscribe to my newsletter

Read articles from Robert Mawusi Kpodo directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Robert Mawusi Kpodo
Robert Mawusi Kpodo