This commit is contained in:
Kevin G Christiano 2020-04-03 11:28:05 -04:00
parent c0d85694c6
commit cf6db73acb

View File

@ -38,6 +38,7 @@ open class Styler {
case B3
case B20
/// Returns the font size of the current enum case.
public func pointSize() -> CGFloat {
switch self {
case .H1:
@ -82,6 +83,7 @@ open class Styler {
}
}
/// Determines if the selected font case is bold or regular.
public func isBold() -> Bool {
switch self {
@ -111,6 +113,7 @@ open class Styler {
}
}
/// Determines if the current enum is a legacy or modern font.
public func isLegacyFont() -> Bool {
switch self {
@ -140,6 +143,7 @@ open class Styler {
}
}
/// Returns the font based on the declared enum case.
public func getFont(_ genericScaling: Bool = true) -> UIFont? {
let size = genericScaling ? sizeFontGeneric(forCurrentDevice: pointSize()) : pointSize()