Unrecognized font family react native app using google custom font

Please provide the following:

  1. SDK Version: 4.2.1
  2. Platforms(Android/iOS/web/all): iOS
  3. Font

I’m loading a google custom font with expo in my App.js file as such:

import {
  useFonts,
  Poppins_300Light,
  Poppins_400Regular,
  Poppins_400Regular_Italic,
  Poppins_500Medium,
  Poppins_700Bold,
  Poppins_900Black,
} from "@expo-google-fonts/poppins";


function App() {
 
  const [loading, setLoading] = useState(true);

  let [fontsLoaded] = useFonts({
    "Poppins-Light": Poppins_300Light,
    "Poppins-Regular": Poppins_400Regular,
    "Poppins-Regular-Italic": Poppins_400Regular_Italic,
    "Poppins-Medium": Poppins_500Medium,
    "Poppins-Bold": Poppins_700Bold,
    "Poppins-Black": Poppins_900Black,
  });

 

  if (loading || !fontsLoaded) {
    return <AppLoading />;
  }

Now, when I try to use font-family: Poppins-Light in my Login.js file, I get the error Unrecognized font family "Poppins-Light"

Any idea what I’m doing wrong?

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