Reputation: 97
Everything was okay before I upgrade Expo SDK to 35 and I face this issue now. layar-bahtera-regular is my custom font and I used Font.loadAsync already. What is the problem?
import * as Font from 'expo-font';
state = { fontLoaded: false }
async componentDidMount() {
await Font.loadAsync({
'layar-bahtera-regular': require('../../assets/fonts/LayarBahteraDdW01Regular.ttf')
});
this.setState({ fontLoaded: true });
}
Upvotes: 3
Views: 488
Reputation: 66
did you try doing this after the upgrade?
Also, you can try executing this command expo install expo-font
Let me know, if it helped
Upvotes: 1