Please provide the following:
- SDK Version: 38.0.8
- Platforms(Android/iOS/web/all): Android
Last Night I have updated Expo and Expo CLI 3.22.3 and now i am having trouble with Expo Font.
Fonts was working perfectly before updating cli and expo now after app loads it return
fontFamily “PrimaryFont” is not a system font and has not been loaded through Font.loadAsync
const [fontStatus, setFontStatus] = useState(false);
const loadFont = async () => {
try {
await Font.loadAsync({
PrimaryFont: require(“./assets/font/Avenir-Light.ttf”),
});
setFontStatus(true);
} catch (e) {
console.log(“error”, e);
}
};
useEffect(() => {
loadFont();
}, );
console.log(fontStatus);
return (
{fontStatus && (
<AppContainer
ref={(navigator) => {
setNavigator(navigator);
}}
/>
)}