vds_ios/VDS/Protocols/Fontable.swift
Matt Bruce df82f85724 added Modelable
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2022-08-05 11:54:20 -05:00

27 lines
496 B
Swift

//
// Fontable.swift
// VDS
//
// Created by Matt Bruce on 8/3/22.
//
import Foundation
import UIKit
public protocol Fontable {
var fontSize: FontSize { get set }
var fontWeight: FontWeight { get set }
var fontCategory: FontCategory { get set }
}
extension Fontable {
var fontStyle: FontStyle? {
return try? FontStyle.style(for: fontCategory, fontWeight: fontWeight, fontSize: fontSize)
}
var font: UIFont? {
return fontStyle?.font
}
}