expo/google-fonts

Unrecognized font family "Poppins-Light"

d-warfield opened this issue · 2 comments

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 ;
}
`

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?

Can you post a complete MRE (https://stackoverflow.com/help/minimal-reproducible-example) ? This font is working fine for me.

Closing this bc it's very old and I can't repro.