updated for easier readability
This commit is contained in:
parent
695ac8b841
commit
7418027b56
@ -28,13 +28,13 @@ open class Styler {
|
||||
|
||||
// Legacy Fonts
|
||||
case H1
|
||||
case H2
|
||||
case H3
|
||||
case H32
|
||||
case H2
|
||||
case B20
|
||||
case H3
|
||||
case B1
|
||||
case B2
|
||||
case B3
|
||||
case B20
|
||||
|
||||
/// Returns the font size of the current enum case.
|
||||
public func pointSize() -> CGFloat {
|
||||
@ -45,8 +45,7 @@ open class Styler {
|
||||
case .Title2XLarge:
|
||||
return 36
|
||||
|
||||
case .TitleXLarge,
|
||||
.H32:
|
||||
case .TitleXLarge, .H32:
|
||||
return 32
|
||||
|
||||
case .H2:
|
||||
@ -57,8 +56,7 @@ open class Styler {
|
||||
return 24
|
||||
|
||||
case .BoldTitleMedium,
|
||||
.RegularTitleMedium,
|
||||
.B20:
|
||||
.RegularTitleMedium, .B20:
|
||||
return 20
|
||||
|
||||
case .H3:
|
||||
@ -68,15 +66,12 @@ open class Styler {
|
||||
.RegularBodyLarge:
|
||||
return 16
|
||||
|
||||
case .BoldBodySmall,
|
||||
.RegularBodySmall,
|
||||
.B1,
|
||||
.B2:
|
||||
case .BoldBodySmall, .B1,
|
||||
.RegularBodySmall, .B2:
|
||||
return 13
|
||||
|
||||
case .BoldMicro,
|
||||
.RegularMicro,
|
||||
.B3:
|
||||
.RegularMicro, .B3:
|
||||
return 11
|
||||
}
|
||||
}
|
||||
@ -96,27 +91,22 @@ open class Styler {
|
||||
|
||||
switch self {
|
||||
case .RegularTitleLarge,
|
||||
.RegularTitleMedium,
|
||||
.RegularTitleMedium, .B20,
|
||||
.RegularBodyLarge,
|
||||
.RegularBodySmall,
|
||||
.RegularMicro,
|
||||
.B2,
|
||||
.B3,
|
||||
.B20:
|
||||
.RegularBodySmall, .B2,
|
||||
.RegularMicro, .B3:
|
||||
return false
|
||||
|
||||
case .Title2XLarge,
|
||||
.TitleXLarge,
|
||||
case .H1,
|
||||
.Title2XLarge,
|
||||
.TitleXLarge, .H32,
|
||||
.H2,
|
||||
.BoldTitleLarge,
|
||||
.BoldTitleMedium,
|
||||
.BoldBodyLarge,
|
||||
.BoldBodySmall,
|
||||
.BoldMicro,
|
||||
.H1,
|
||||
.H2,
|
||||
.H3,
|
||||
.H32,
|
||||
.B1:
|
||||
.BoldBodyLarge,
|
||||
.BoldBodySmall, .B1,
|
||||
.BoldMicro:
|
||||
return true
|
||||
}
|
||||
}
|
||||
@ -140,9 +130,9 @@ open class Styler {
|
||||
return false
|
||||
|
||||
case .H1,
|
||||
.H32,
|
||||
.H2,
|
||||
.H3,
|
||||
.H32,
|
||||
.B1,
|
||||
.B2,
|
||||
.B3,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user