#if DEBUG | |
extension UIFont.Size { | |
var debugDescription: String { "\(self)" } | |
} | |
extension UIFont { | |
class func printAllFonts() { | |
let families = UIFont.Family.allCases | |
let sizes = UIFont.Size.allCases | |
let weights = UIFont.CustomWeight.allCases | |
let string = families.map { family in | |
"\(family.rawValue):" + sizes.map { size in | |
"\n\t\(size.debugDescription):\n\t\t" + weights.map { weight in | |
"\(UIFont(family, size, weight))" | |
}.joined(separator: "\n\t\t") | |
}.joined(separator: "\n") | |
}.joined(separator: "\n") | |
print(string) | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment