We are having 2 problems loading custom fonts on Android.
- None of the italic versions work
- The black version only works with weight
950
, which is not an allowed value.
This is using:
"expo": "~51.0.8",
"expo-font": "~12.0.5",
On app.json:
"plugins": [
[
"expo-font",
{
"fonts": [
"./assets/fonts/Averta-Regular.otf",
"./assets/fonts/Averta-RegularItalic.otf",
"./assets/fonts/Averta-Semibold.otf",
"./assets/fonts/Averta-SemiboldItalic.otf",
"./assets/fonts/Averta-Black.otf",
"./assets/fonts/Averta-BlackItalic.otf"
]
}
]
],
And then part of the code is:
<Text
style={{ fontFamily: "Averta-Black", fontWeight: 950, fontSize: 32 }}
>
Averta Black 950
</Text>
<Text
style={{
fontFamily: "Averta-SemiboldItalic",
fontWeight: 600,
fontSize: 32,
fontStyle: "italic",
}}
>
Averta Semibold Italic 600
</Text>
There are no errors or warnings on the console, and yet the fonts don’t work as expected.
Any advice on what we can try?