SwiftUI Custom Fonts with working Xcode Previews
This is a small SwiftUI only app that demonstrates how to use custom fonts, where the custom fonts are contained in a Swift Package Manager (SPM) module. Crucially, the custom fonts will still work in Xcode Previews, even when previewing from a different module such as a feature module.
It also demonstrates how to display SwiftUI views contained in a different module that contains image assets, and continue to have the Xcode Previews work without crashing.
Please see the full writeup and explanation at: https://dev.jeremygale.com/swiftui-how-to-use-custom-fonts-and-images-in-a-swift-package-cl0k9bv52013h6bnvhw76alid