Can someone help me with installing and using fonts? Firstly, I downloaded all needed fonts into assets/fonts (you can see them in the picture here: https://imgur.com/dSAE0Go). After that I updated react-native.config.js:
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
};
Then, I ran npx react-native-asset
. Since I use github, I saw, that it, in fact, linked and copied fonts in both android and ios.
I pasted my fonts in the theme.tsx in FONTS, exported it and tried to import in any component by FONTS.mainText (for example). I don’t see any errors, but there is also no change in font. I tried reloading my application, completely shutting down metro server and then starting it without cache. Nothing changed.
You can see code for everything I’ve described here: https://pastebin.com/KESswqZz
Uli I is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.