Skip to content

Commit 0741d59

Browse files
authored
Add a public init to Font.TextStyle.Resolved (#557)
1 parent f80272e commit 0741d59

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Sources/SwiftCrossUI/Values/TextStyle.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ extension Font.TextStyle {
4949
emphasizedWeight: .semibold,
5050
lineHeight: 16
5151
)
52+
53+
public init(
54+
pointSize: Double,
55+
weight: Font.Weight = .regular,
56+
emphasizedWeight: Font.Weight,
57+
lineHeight: Double
58+
) {
59+
self.pointSize = pointSize
60+
self.weight = weight
61+
self.emphasizedWeight = emphasizedWeight
62+
self.lineHeight = lineHeight
63+
}
5264
}
5365

5466
/// Resolves the text style's concrete text properties for the given device

0 commit comments

Comments
 (0)