Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Why I got error message custom font, react native?

$
0
0

I have been desperate for 2 days. I am trying to use custom fonts in my React Native application. I have followed many tutorials, but nothing works.

I have: - import my fonts into the "root/assets/fonts" folder (image 1) enter image description here

  • create a react-native.config.js file (image 2) enter image description here

  • run "react-native link"

  • I also checked that the name of the font was correct.

But I still get this error message:

fontFamily "Gilroy-Regular" is not a system font and has not been loaded through Font.loadAsync.
- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.
- If this is a custom font, be sure to load it with Font.loadAsync.

Amazing fact: when I build the app on xcode directly, I don't get an error message and the fonts are well used.

This error occurs when I build with expo.

Thank you a lot for your help..


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>