Font loading error

#1

I am so new to expo and i just installed a tab navigation template for my first app and i read in the docs that you can use custom font.
each time i run this code i get error that ‘poppins’ is not a system type font and is not loaded with expo aynch.

return Promise.all([
      Font.loadAsync([
        { 'poppins': require('./assets/fonts/poppins.ttf') },
      ]),
    ]);


but if i replace the name with the default font name that comes wit themplate but changed the font it works and the font is loaded.

return Promise.all([
      Font.loadAsync([
        { 'space-mono': require('./assets/fonts/poppins.ttf') },
      ]),
​
    ]);
#2

hey! I’m kind of unclear on the issue, basically the font correctly loads and is displayed in the second code snippet, but you can’t use the name 'poppins' for the font. Is that correct?

if so, can you show the exact error that you get?

#3

The exact error i get was ‘poppins’ is not a system type font and its not
loaded with Expo.Font.loadasync

#4

interesting. you have the font file saved in assets correct? and the font loads and renders, just with an incorrect name?

#5

Exactly, i am so surprised on it… and if i should try to change the name to anything else also it wont work except i used that same name but i can use different fonts