Skip to content

Instantly share code, notes, and snippets.

@shubhamkakkar
Created January 19, 2021 21:23
Show Gist options
  • Select an option

  • Save shubhamkakkar/f64deb77d7daf03bd7ab3b8730b2ce09 to your computer and use it in GitHub Desktop.

Select an option

Save shubhamkakkar/f64deb77d7daf03bd7ab3b8730b2ce09 to your computer and use it in GitHub Desktop.

Revisions

  1. shubhamkakkar created this gist Jan 19, 2021.
    26 changes: 26 additions & 0 deletions RN Custom Fonts and RNVectorIcons
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    // make sure you have not installed react-native vector icons by now

    make a file named react-native.config.js, content should be following
    ```
    module.exports = {
    projects: {
    ios: {},
    android: {},
    },
    assets: ['./assets/fonts'],
    };
    ```

    As represented in the file, the custom fonts should be made available in the "assets/fonts" folder in the root directory.

    ater this, execute the following command
    ```
    yarn react-native link
    ```
    This will
    1. copy the contents into anroid/app/src/main/assets
    2. createa a folder called Resources, if not existing in ios and copy these files there.


    After this,
    install "react native vector icons and follow the manual procedure of adding the fonts to xcode and android"