Custom Font Not Working Even After loaded with loadAsyn

Please provide the following:

  1. SDK Version: 38.0.8
  2. 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);
}}
/>
)}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.