updated for easier readability

This commit is contained in:
Kevin G Christiano 2020-12-17 09:49:28 -05:00
parent 695ac8b841
commit 7418027b56

View File

@ -28,13 +28,13 @@ open class Styler {
// Legacy Fonts // Legacy Fonts
case H1 case H1
case H2
case H3
case H32 case H32
case H2
case B20
case H3
case B1 case B1
case B2 case B2
case B3 case B3
case B20
/// Returns the font size of the current enum case. /// Returns the font size of the current enum case.
public func pointSize() -> CGFloat { public func pointSize() -> CGFloat {
@ -45,8 +45,7 @@ open class Styler {
case .Title2XLarge: case .Title2XLarge:
return 36 return 36
case .TitleXLarge, case .TitleXLarge, .H32:
.H32:
return 32 return 32
case .H2: case .H2:
@ -57,8 +56,7 @@ open class Styler {
return 24 return 24
case .BoldTitleMedium, case .BoldTitleMedium,
.RegularTitleMedium, .RegularTitleMedium, .B20:
.B20:
return 20 return 20
case .H3: case .H3:
@ -68,15 +66,12 @@ open class Styler {
.RegularBodyLarge: .RegularBodyLarge:
return 16 return 16
case .BoldBodySmall, case .BoldBodySmall, .B1,
.RegularBodySmall, .RegularBodySmall, .B2:
.B1,
.B2:
return 13 return 13
case .BoldMicro, case .BoldMicro,
.RegularMicro, .RegularMicro, .B3:
.B3:
return 11 return 11
} }
} }
@ -96,27 +91,22 @@ open class Styler {
switch self { switch self {
case .RegularTitleLarge, case .RegularTitleLarge,
.RegularTitleMedium, .RegularTitleMedium, .B20,
.RegularBodyLarge, .RegularBodyLarge,
.RegularBodySmall, .RegularBodySmall, .B2,
.RegularMicro, .RegularMicro, .B3:
.B2,
.B3,
.B20:
return false return false
case .Title2XLarge, case .H1,
.TitleXLarge, .Title2XLarge,
.TitleXLarge, .H32,
.H2,
.BoldTitleLarge, .BoldTitleLarge,
.BoldTitleMedium, .BoldTitleMedium,
.BoldBodyLarge,
.BoldBodySmall,
.BoldMicro,
.H1,
.H2,
.H3, .H3,
.H32, .BoldBodyLarge,
.B1: .BoldBodySmall, .B1,
.BoldMicro:
return true return true
} }
} }
@ -140,9 +130,9 @@ open class Styler {
return false return false
case .H1, case .H1,
.H32,
.H2, .H2,
.H3, .H3,
.H32,
.B1, .B1,
.B2, .B2,
.B3, .B3,