vds_ios/VDS/Protocols/Fontable.swift
Matt Bruce 4c38676f59 refactored more fonts
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2022-08-05 09:01:26 -05:00

27 lines
493 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 style: FontStyle? {
return try? FontStyle.style(for: fontCategory, fontWeight: fontWeight, fontSize: fontSize)
}
var font: UIFont? {
return self.style?.font
}
}