How to add custom font in react native android

后端 未结 13 1253
别那么骄傲
别那么骄傲 2020-12-01 12:28

I am learning react-native, trying to create some demo apps just for learning. I want to set fontFamily to roboto thin of my toolbar title.

<
13条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-01 13:13

    For ios:

    Add your fonts in given folder structure :

    /assets/fonts

    and place your fonts in it .

    In the root folder . Add a file named

    react-native.config.js

    copy the code and paste

    module.exports = {
    assets: [‘./assets/fonts’]
    

    }

提交回复
热议问题