Oops forgot the public function to register fonts.

This commit is contained in:
Robert McGovern 2021-07-08 22:07:31 +01:00
parent 6c1566b137
commit e4975b1569
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,12 @@ public let fontBundle = Bundle.module
// _ = UIFont.registerFont(bundle: .module, fontName: "VeganStyle-Regular", fontExtension: "ttf")
//}
public func registerFonts() {
registerFont("BeautifulPeople-Regular", fileExtension: "ttf")
registerFont("VeganStyle-Regular", fileExtension: "ttf")
}
func registerFont(_ name: String, fileExtension: String) {
guard let fontURL = Bundle.module.url(forResource: name, withExtension: fileExtension) else {
print("No font named \(name).\(fileExtension) was found in the module bundle")