Releases: SRGSSR/srgappearance-apple
Update fonts and colors
- Updates font sizes for
SRGFontStyleSubtitle1
andSRGFontStyleH2
. - Add
UIColor.srg_gray71Color
color. - Add
UIColor. srg_grayD2Color
color (replacingUIColor. srg_grayC7Color
, deprecated).
What's changed
- Build and test with Xcode 14.3 by @pyby in #13
- CI: update builds and tests to Xcode 14.3.1 by @pyby in #14
- Xcode 15 with iOS 17 and tvOS 17 by @pyby in #15
- Build and test with Xcode 15.0.1 by @pyby in #16
- Build and test with Xcode 15.3 by @pyby in #17
- Design system update by @pyby in #18
New Contributors
Full Changelog: 5.2.1...5.2.2
Maintenance release
Fixes
- Fix font-related assertion crashes in unit tests (#12).
Restore Catalyst support
This release makes sure the project builds with Xcode 14 without any significant warning.
Font weight fix
- Fix incorrect font weights on devices whose language is not English.
Global font SwiftUI modifiers
The SRG SwiftUI font modifiers can be applied not only to text views but to entire view hierarchies.
Font registration fixes
Breaking changes
- The
SRGAppearanceRegisterFont
function has been removed. Use CoreText registration functions likeCTFontManagerRegisterFontsForURL
instead.
Fixes
- tvOS 15 crashes due to unreliable font registrations have been fixed (#8).
Maintenance release
This release contains minor improvements to the code and CI setup with no impact on overall behavior.
Variable font, styles, metrics and colors
This release is a major overhaul of SRG Appearance.
Variable font
The SRG SSR font is now variable with support for arbitrary weights. Both the text and display fonts are provided.
Styles
SRG Appearance now provides several built-in styles which corresponds to fixed sizes, weights and scaling behaviors, defined both for iOS and tvOS. Your designs can benefit from using these standard styles across platforms.
If your application does not want to use the standard styles we provide SRG Appearance still provides an API with which you can define your own styles.
Remark
Standard styles support XS, S, M, L, XL and XXL content sizes, but not accessibility sizes. Accessibility sizes are namely tricky to support from a layout perspective. If your application still wants to support such sizes you should define your own styles, which can support arbitrary content sizes.
Metrics
SRG Appearance provides UIFontMetrics
matching its styles (as well as the @SRGScaledMetric
property wrapper for SwiftUI) which allows you to scale scalar values depending on content size settings.
Colors
Several gray colors have been added.
Swift and SwiftUI support
SRG Appearance now provides improved APIs for Swift and SwiftUI. Swift code must link against SRGAppearanceSwift
to use these APIs.
Minimum deployment target
The minimum deployment target has been bumped to iOS 12.
Assertion removal in release builds
Ensure assertions are never fired in release builds.
Xcode crash fix
This release packages resources differently to avoid Xcode crashing for some projects when attempting to run a unit test target.