Use custom-font in React-Native

前端 未结 8 2048
孤独总比滥情好
孤独总比滥情好 2020-12-04 10:36

I would like to use custom font in my app, but I keep getting error

[RCTLog][tid:0x78f70450][RCTConvert.m:581]>Unrecognized font family \'Roboto\'
         


        
8条回答
  •  無奈伤痛
    2020-12-04 10:51

    That's because iOS does not have the Roboto font available by default.

    Exactly. To make it available you have to include it in your project from Xcode. Just follow the steps that this answer provides, it's pretty straightforward.

    Once you have done this, then you should have no problem using it from JS.

提交回复
热议问题