Alright, Ive copied the example at https://reactnative.dev/docs/text here:
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { useFonts } from '@use-expo/font';
import { AppLoading } from 'expo';
export default props => {
let [fontsLoaded] = useFonts({
'Inter-SemiBoldItalic': 'https://rsms.me/inter/font-files/Inter-SemiBoldItalic.otf?v=3.12',
'SequelSansBlackDisp' : require('./assets/fonts/SequelSansBlackDisp.ttf'),
});
if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ fontFamily: 'Inter-SemiBoldItalic', fontSize: 28 }}>Inter SemiBoldItalic</Text>
<Text>Platform Default</Text>
</View>
);
}
};
And have my fonts arranged like this:
When I delete the SequelSansBlackDisp font and just have the Inter-SemiBold, all works fine. My local font, however, gets the app stuck on loading and gives the error:
How can I load my custom font? (I'd like this to work when I deploy to device as well)