Maping fontFamily with font weight and font style
npm install rn-font-mappingyarn add rn-font-mapping./assets/fontsyarn add -D opentype.jscustom-fonts.json at root foldernode ./node_modules/rn-font-mapping/scripts/map-font.js2. Use our Text component or map it with your own way.
``
import fontMapping from './custom-fonts.json';
import {Text as BaseText} from 'rn-font-mapping';
const Text = (props)=>{
return
}
...
fontStyle: 'italic',
fontWeight: weight
}}>
Hello world
`
result:
iOS:
![iOS]
Android:
![Android]