React-native-web: how can i add custom fonts

Created on 30 Aug 2017  路  4Comments  路  Source: necolas/react-native-web

All 4 comments

Import them in the HTML shell of your app or lazy load them from js

thanks!

can someone maybe provide some example? because i really dint get it where i have to put what to make it work
sorry for the maybe dumb request but i麓ve never worked with HTML, fontface and all this stuff before

Hi I had the same issue. Here one solution:

  1. Get a link for your font. For example from Google Fonts:
    <link href="https://fonts.googleapis.com/css?family=Your First Font | Your Second Font">
  2. Add this link into the /public/index.htlml file. Insert it in the head tag.
    <head> some where here </head>
  3. In your styles use:
    fontFamily: "Your First Font"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

shirakaba picture shirakaba  路  3Comments

zhangking picture zhangking  路  3Comments

roryabraham picture roryabraham  路  3Comments

necolas picture necolas  路  3Comments

bcpugh picture bcpugh  路  3Comments