theme.customFonts doesn't seem to work
See original GitHub issueFirst of all, I am in love with this project! 😃
I am trying to use custom fonts, and it seems, by defining font in the theme.customFonts, and then referencing it in the fonts doesn’t seem to do its job.
So let’s consider the following:
customFonts: {
inter: {
bold: "Inter-Bold",
default: "Inter-Regular",
normal: "Inter-Regaulr",
"400": "Inter-Regular",
"300": "Inter-Thin",
"500": "Inter-Medium",
"600": "Inter-Medium",
"700": "Inter-SemiBold",
},
},
fonts: {
root: "inter",
},
Of course, the assets are loaded, using the Font.loadAsync(fonts) in a custom provider.
This throws the following error:
fontFamily “inter” is not a system font and has not been loaded through Font.loadAsync. If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.
The weird thing, if i change it like this:
fonts: {
root: "Inter-Bold",
},
The font changes to bold. This works though both ob the device and in the browser, so that’s good.
Any idea how to get around on this?
Thank you in advance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
Looks like it was because it wasn’t capitalized in the theme before. Glad it’s working.
UPDATE:
Hah! It seems like it’s working this way! 😃
Thank you!