label font bugfix caused by the dissonance between label and styler setting....

This commit is contained in:
Pfeil, Scott Robert 2019-12-02 10:11:04 -05:00
parent ee773eed89
commit 3e46438fd0

View File

@ -243,8 +243,12 @@ public typealias ActionBlock = () -> ()
if let fontStyle = json?.optionalStringForKey("fontStyle") {
MFStyler.styleLabel(label, withStyle: fontStyle, genericScaling: mvmLabel == nil)
mvmLabel?.standardFontSize = label.font.pointSize
} else {
let fontSize = json?["fontSize"] as? CGFloat
if let fontSize = fontSize {
mvmLabel?.standardFontSize = fontSize
}
if let fontName = json?.optionalStringForKey("fontName") {
label.font = MFFonts.mfFont(withName: fontName, size: fontSize ?? mvmLabel?.standardFontSize ?? label.font.pointSize)