SkillAgentSearch skills...

SwiftUICustomFonts

SwiftUI app that uses custom fonts in a Swift Package, but Xcode Previews still work.

Install / Use

/learn @jgale/SwiftUICustomFonts
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

Related Skills

View on GitHub
GitHub Stars19
CategoryDevelopment
Updated10mo ago
Forks1

Languages

Swift

Security Score

82/100

Audited on May 7, 2025

No findings