Skip to content

Instantly share code, notes, and snippets.

@vinczebalazs
Created February 10, 2020 18:28
Show Gist options
  • Save vinczebalazs/64026a56b138b8aa3fb443e7c4a42321 to your computer and use it in GitHub Desktop.
Save vinczebalazs/64026a56b138b8aa3fb443e7c4a42321 to your computer and use it in GitHub Desktop.
struct Fonts {
enum Weight: String {
case bold = "Bold"
case light = "Light"
case regular = "Regular"
case semiBold = "SemiBold"
}
enum Font: String {
case poppins = "Poppins"
case quicksand = "Quicksand"
}
static func font(_ name: Font, weight: Weight, size: CGFloat) -> UIFont {
UIFont(name: "\(name.rawValue)-\(weight.rawValue)", size: size)!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment