I'm currently using a custom font in my app, but am finding it a bit frustrating having to use .font(Font.custom("Montserrat-Regular", size: 16)) everywhere. Is there a way I can set the the entire app to be using this font, and I can simply use .font(.system(size: 16)) and even use standard sizes like .font(.caption) and it will use the custom font?
I've actually set .font(Font.custom("Montserrat-Medium", size: 16)) on my ContentView as shown below, which allows me to use this font everywhere, but the size is always 16, and when I change it, the font goes back to the default font.
@main
struct AppName: App {
var body: some Scene {
WindowGroup {
ContentView()
.font(Font.custom("Montserrat-Regular", size: 16))
}
}
}