diff --git a/VDS/Typography/Typography.swift b/VDS/Typography/Typography.swift index 3759cb26..167f378e 100644 --- a/VDS/Typography/Typography.swift +++ b/VDS/Typography/Typography.swift @@ -48,6 +48,9 @@ public struct TextStyle: Equatable, RawRepresentable { } } +extension VDSTypography { + public static let letterSpacingSemiWide: CGFloat = 0.25 +} //MARK: Definitions extension TextStyle { @@ -56,169 +59,169 @@ extension TextStyle { fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature144 : VDSTypography.fontSizeFeature96, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature136 : VDSTypography.lineHeightFeature88, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldFeatureXLarge = TextStyle(rawValue: "boldFeatureXLarge", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature144 : VDSTypography.fontSizeFeature96, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature136 : VDSTypography.lineHeightFeature88, - letterSpacing: 0.25) + letterSpacing: 0) public static let featureLarge = TextStyle(rawValue: "featureLarge", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature128 : VDSTypography.fontSizeFeature80, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature120 : VDSTypography.lineHeightFeature76, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldFeatureLarge = TextStyle(rawValue: "boldFeatureLarge", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature128 : VDSTypography.fontSizeFeature80, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature120 : VDSTypography.lineHeightFeature76, - letterSpacing: 0.25) + letterSpacing: 0) public static let featureMedium = TextStyle(rawValue: "featureMedium", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature96 : VDSTypography.fontSizeFeature64, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature88 : VDSTypography.lineHeightFeature64, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldFeatureMedium = TextStyle(rawValue: "boldFeatureMedium", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature96 : VDSTypography.fontSizeFeature64, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature88 : VDSTypography.lineHeightFeature64, - letterSpacing: 0.25) + letterSpacing: 0) public static let featureSmall = TextStyle(rawValue: "featureSmall", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature80 : VDSTypography.fontSizeFeature48, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature76 : VDSTypography.lineHeightFeature48, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldFeatureSmall = TextStyle(rawValue: "boldFeatureSmall", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature80 : VDSTypography.fontSizeFeature48, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature76 : VDSTypography.lineHeightFeature48, - letterSpacing: 0.25) + letterSpacing: 0) public static let featureXSmall = TextStyle(rawValue: "featureXSmall", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature64 : VDSTypography.fontSizeFeature40, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature64 : VDSTypography.lineHeightFeature40, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldFeatureXSmall = TextStyle(rawValue: "boldFeatureXSmall", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature64 : VDSTypography.fontSizeFeature40, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature64 : VDSTypography.lineHeightFeature40, - letterSpacing: 0.25) + letterSpacing: 0) public static let title2XLarge = TextStyle(rawValue: "title2XLarge", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle64 : VDSTypography.fontSizeTitle40, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle64 : VDSTypography.lineHeightTitle40, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldTitle2XLarge = TextStyle(rawValue: "boldTitle2XLarge", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle64 : VDSTypography.fontSizeTitle40, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle64 : VDSTypography.lineHeightTitle40, - letterSpacing: 0.25) + letterSpacing: 0) public static let titleXLarge = TextStyle(rawValue: "titleXLarge", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle48 : VDSTypography.fontSizeTitle32, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle48 : VDSTypography.lineHeightTitle36, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldTitleXLarge = TextStyle(rawValue: "boldTitleXLarge", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle48 : VDSTypography.fontSizeTitle32, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle48 : VDSTypography.lineHeightTitle36, - letterSpacing: 0.25) + letterSpacing: 0) public static let titleLarge = TextStyle(rawValue: "titleLarge", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle32 : VDSTypography.fontSizeTitle24, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle36 : VDSTypography.lineHeightTitle28, - letterSpacing: 0.25) + letterSpacing: VDSTypography.letterSpacingSemiWide) public static let boldTitleLarge = TextStyle(rawValue: "boldTitleLarge", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle32 : VDSTypography.fontSizeTitle24, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle36 : VDSTypography.lineHeightTitle28, - letterSpacing: 0.25) + letterSpacing: 0) public static let titleMedium = TextStyle(rawValue: "titleMedium", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle24 : VDSTypography.fontSizeTitle20, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle28 : VDSTypography.lineHeightTitle24, - letterSpacing: 0.25) + letterSpacing: 0) public static let boldTitleMedium = TextStyle(rawValue: "boldTitleMedium", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle24 : VDSTypography.fontSizeTitle20, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle28 : VDSTypography.lineHeightTitle24, - letterSpacing: 0.25) + letterSpacing: 0) public static let titleSmall = TextStyle(rawValue: "titleSmall", fontFace: .dsLight, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle20 : VDSTypography.fontSizeTitle16, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle24 : VDSTypography.lineHeightTitle20, - letterSpacing: 0.25) + letterSpacing: 0) public static let boldTitleSmall = TextStyle(rawValue: "boldTitleSmall", fontFace: .dsBold, pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle20 : VDSTypography.fontSizeTitle16, lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle24 : VDSTypography.lineHeightTitle20, - letterSpacing: 0.25) + letterSpacing: 0) public static let bodyLarge = TextStyle(rawValue: "bodyLarge", fontFace: .dsRegular, pointSize: VDSTypography.fontSizeBody16, lineHeight: VDSTypography.lineHeightBody20, - letterSpacing: 0.5) + letterSpacing:VDSTypography.letterSpacingWide) public static let boldBodyLarge = TextStyle(rawValue: "boldBodyLarge", fontFace: .dsBold, pointSize: VDSTypography.fontSizeBody16, lineHeight: VDSTypography.lineHeightBody20, - letterSpacing: 0.5) + letterSpacing: VDSTypography.letterSpacingWide) public static let bodyMedium = TextStyle(rawValue: "bodyMedium", fontFace: .dsRegular, pointSize: VDSTypography.fontSizeBody14, lineHeight: VDSTypography.lineHeightBody18, - letterSpacing: 0.5) + letterSpacing: VDSTypography.letterSpacingWide) public static let boldBodyMedium = TextStyle(rawValue: "boldBodyMedium", fontFace: .dsBold, pointSize: VDSTypography.fontSizeBody14, lineHeight: VDSTypography.lineHeightBody18, - letterSpacing: 0.5) + letterSpacing: VDSTypography.letterSpacingWide) public static let bodySmall = TextStyle(rawValue: "bodySmall", fontFace: .dsRegular, pointSize: VDSTypography.fontSizeBody12, lineHeight: VDSTypography.lineHeightBody16, - letterSpacing: 0.25) + letterSpacing: 0) public static let boldBodySmall = TextStyle(rawValue: "boldBodySmall", fontFace: .dsBold, pointSize: VDSTypography.fontSizeBody12, lineHeight: VDSTypography.lineHeightBody16, - letterSpacing: 0.5) + letterSpacing: 0) public static let micro = TextStyle(rawValue: "micro", fontFace: .dsRegular, pointSize: VDSTypography.fontSizeMicro11, lineHeight: VDSTypography.lineHeightMicro16, - letterSpacing: 0.25) + letterSpacing: 0) public static let boldMicro = TextStyle(rawValue: "boldMicro", fontFace: .dsBold, pointSize: VDSTypography.fontSizeMicro11, lineHeight: VDSTypography.lineHeightMicro16, - letterSpacing: 0.5) + letterSpacing: 0) public static var allCases: [TextStyle] { return [