Skip to content Skip to sidebar Skip to footer

User Uploaded Fontfamily For React-native App

I am working on a react-native project, in which I have to implement a functionality in which user can set a custom theme for the app, the theme includes Theme color, font color an

Solution 1:

Below are native implementations for ios and android. It may work or not work. For to use in react native you've to create lib having this native code and js code for invoking native functions

Refer to this below link for iOS

Refer to this below link for android

Solution 2:

In React Native, you need to link the fonts to android & ios folder.

Linking fonts will create each font's entry in Info.plist file (ios) & in assets folder of android/src/main.

This is mandatory.

Also, create react-native.config.js file in project root folder and add below text:

module.exports= {
    project: {
        ios: {},
        android: {},
    },
    assets: ['./src/assets/fonts']
    };

Post a Comment for "User Uploaded Fontfamily For React-native App"