diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index 087e893c..d47a374f 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -402,11 +402,11 @@ public typealias ActionBlock = () -> () attributedString.insert(mutableString, at: imageAtt.location) case let fontAtt as LabelAttributeFontModel: - if let fontStyle = fontAtt.style?.rawValue { - let styles = MFStyler.styleGetAttributedString("0", withStyle: fontStyle) + if let fontStyle = fontAtt.style { attributedString.removeAttribute(.font, range: range) attributedString.removeAttribute(.foregroundColor, range: range) - attributedString.addAttributes(styles.attributes(at: 0, effectiveRange: nil), range: range) + attributedString.addAttribute(.font, value: fontStyle.getFont(), range: range) + attributedString.addAttribute(.foregroundColor, value: fontStyle.color(), range: range) } else { let fontSize = fontAtt.size var font: UIFont? diff --git a/MVMCoreUI/Styles/Styler.swift b/MVMCoreUI/Styles/Styler.swift index d8d0a519..43e4d319 100644 --- a/MVMCoreUI/Styles/Styler.swift +++ b/MVMCoreUI/Styles/Styler.swift @@ -81,6 +81,16 @@ open class Styler { } } + public func color() -> UIColor { + switch self { + case .B3: + return .mvmCoolGray6 + + default: + return .mvmBlack + } + } + /// Determines if the selected font case is bold or regular. public func isBold() -> Bool {