How to Adding Custom Fonts in React Native

How to Add Custom Fonts in React Native (Android & iOS)

When designing a mobile app, using custom fonts can enhance the user interface and overall experience. React Native makes it straightforward to integrate custom fonts into your project. This guide will walk you through adding custom fonts for both Android and iOS platforms.

Updated for 2026: this guide works with current React Native versions (0.88 at the time of writing). Note that the config file must be named react-native.config.js, with a dot, not a dash. An earlier version of this post had a typo there; it’s fixed below.

Step 1: Add Your Fonts to the Project

Organize Fonts in Your Project: First, place your custom font files (e.g., .ttf or .otf files) in the assets folder within your project. Here’s an example structure:

project-root/
โ””โ”€โ”€ src/
โ””โ”€โ”€ assets/
โ””โ”€โ”€ Font/
โ”œโ”€โ”€ MyCustomFont-Regular.ttf
โ”œโ”€โ”€ MyCustomFont-Bold.ttf
โ””โ”€โ”€ MyCustomFont-Italic.ttf


Step 2: Create react-native.config.js

Next, create a configuration file to instruct React Native where to find your font assets.

  • Create the File: At the root of your project, create a new file called react-native.config.js.
  • Configure the File: Add the following content to the file:
module.exports = {
    project: {
        ios: {},
        android: {},
    },
    assets: ['./src/assets/Font'],  // Path to your fonts
}

This configuration tells React Native to look for fonts in the assets/Font directory for both iOS and Android.


Step 3: Link the Fonts

Now, you need to link the fonts to your React Native project.

Run the Command to Link Fonts: In your terminal, run the following command:

npx react-native-asset

This command will link your custom fonts to the iOS and Android configurations automatically.

Step 4: Using the Fonts in Your App

After linking the fonts, you can now use them in your app by specifying the font family in your styles.
import { StyleSheet, Text, View } from 'react-native';
const App = () => {
   return (
       <View>
           <Text style={styles.customFontText}>This text uses a custom font!</Text>
       </View>
   );
};

const styles = StyleSheet.create({
   customFontText: {
       fontFamily: 'MyCustomFont-Regular',  // Font family name
       fontSize: 18,
   },
});


export default App;

Make sure the fontFamily value matches the font file name, excluding the file extension (.ttf or .otf).


Why your custom font isn’t showing (and how to fix it)

1. The fontFamily name is different on iOS and Android

This is the number one cause. Android uses the font’s file name (without .ttf). iOS uses the font’s internal PostScript name. If they differ, the font works on one platform and silently falls back on the other.

The easy fix is to rename each font file to its PostScript name, then use that same name everywhere. To find the PostScript name, open the font in Font Book on macOS and check the info panel, or use an online font inspector.

// Works on both platforms when the file is named Poppins-SemiBold.ttf
// and its PostScript name is also "Poppins-SemiBold"
const styles = StyleSheet.create({
  title: { fontFamily: "Poppins-SemiBold", fontSize: 22 },
});

2. You reloaded instead of rebuilding

Fonts are native assets, so a Metro reload isn’t enough. Rebuild the app after linking:

npx react-native-asset
npx react-native start --reset-cache

# in a new terminal
npx react-native run-android
npx react-native run-ios   # macOS only

3. fontWeight doesn’t switch weights on Android

With custom fonts, fontWeight: "bold" often won’t pick your bold file on Android. Load each weight as its own family and reference it directly, for example "Poppins-Regular", "Poppins-SemiBold" and "Poppins-Bold".

4. The old link command doesn’t exist anymore

npx react-native link was removed in React Native 0.69. Use npx react-native-asset as shown above. It copies fonts into android/app/src/main/assets/fonts and adds them to Info.plist on iOS for you.

Using Expo instead?

Expo projects don’t need react-native.config.js. Install expo-font and load fonts with the useFonts hook, or add them through the expo-font config plugin in app.json so they’re bundled at build time.

import { useFonts } from "expo-font";

export default function App() {
  const [loaded] = useFonts({
    "Poppins-Regular": require("./assets/fonts/Poppins-Regular.ttf"),
  });
  if (!loaded) return null;
  return <Text style={{ fontFamily: "Poppins-Regular" }}>Hello!</Text>;
}

FAQ

Can I use Google Fonts in React Native?
Yes. Download the .ttf files from Google Fonts and add them exactly like any other custom font.

How do I remove a font I linked?
Delete it from your fonts folder and run npx react-native-asset again. It removes fonts that are no longer in the assets folder.

Do variable fonts work?
Support for variable fonts has improved in recent releases (React Native 0.88 lists variable fonts in its release notes). For the widest compatibility, separate static files for each weight are still the safest option.

Conclusion

Adding custom fonts in React Native enhances the visual design of your app, helping to match your branding and design language. With just a few steps, you can easily integrate fonts into both Android and iOS projects, offering a polished and cohesive look across platforms.

Now your custom fonts are set up and ready to use in your app!

Leave a Reply