Created
February 10, 2020 18:28
-
-
Save vinczebalazs/64026a56b138b8aa3fb443e7c4a42321 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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