-
-
Save sturdysturge/12ac3796f98ae70811275243556fb9a0 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
enum WeightType: String, CaseIterable { | |
case black, bold, heavy, light, medium, regular, semibold, thin, ultraLight | |
var weight: Font.Weight { | |
switch self { | |
case .black: | |
return .black | |
case .bold: | |
return .bold | |
case .heavy: | |
return .heavy | |
case .light: | |
return .light | |
case .medium: | |
return .medium | |
case .regular: | |
return .regular | |
case .semibold: | |
return .semibold | |
case .thin: | |
return .thin | |
case .ultraLight: | |
return .ultraLight | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment