[Library] Apply line spacing for fonts #348
Labels
🧩 enhancement
Related to enhancements or feature requests
🆕 feature
Related to features
📀 token
Related to tokens (raws, semantics or components)
🔍 triage
A new issue that needs to be treated
Context
Today we did not implement yet the line spacing feature using the
FontLineSpacingRawToken
tokens.In fact, this feature was not implemented until now because we got unusable values from Figma.
Since the tokenator can update these tokens, we have values to use, but they cannot be used as is.
It seems the units in Figma are pixels (px), and not the same as the valeus to given to SwiftUI API.
The values seem to be very high, and should be used with care wether or not the texts are multines.
Documentation for lineSpacing: https://developer.apple.com/documentation/swiftui/view/lineSpacing(_:)
More ressource:
Given the Swift code:
The rendering is the following
Definition of Ready
Definition of Done
TypographyModifier
(beware, feature available for iOS16+, not iOS 15)The text was updated successfully, but these errors were encountered: