Custom fonts for both Android and iOS

suggest change

This uses the older rnpm asset flow (react-native link). Current React Native projects declare assets in react-native.config.js instead.

"rnpm": {
  "assets": [
    "path/to/fontfolder"
  ]
}
"rnpm": {
  "assets": [
    "mystuff/fonts"
  ]
}
<Text style={{ fontFamily: 'FONT-NAME' }}>My Text</Text>

FONT-NAME depends on the platform.

Android

FONT-NAME is the file name without the extension. If the file is Roboto-Regular.ttf, set fontFamily: 'Roboto-Regular'.

iOS

FONT-NAME is the "Full Name" shown in Get Info (right-click the font file, then Get Info). See this note on font names. In the screenshot below, the file is MM Proxima Nova Ultra bold.otf, but the Full Name is Proxima Nova Semibold, so you set fontFamily: 'Proxima Nova Semibold'.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents