From e4975b15696359c6a9d0607041bec9a1b140c10b Mon Sep 17 00:00:00 2001 From: Robert McGovern Date: Thu, 8 Jul 2021 22:07:31 +0100 Subject: [PATCH] Oops forgot the public function to register fonts. --- Sources/CustomFontsPackage/CustomFontsPackage.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/CustomFontsPackage/CustomFontsPackage.swift b/Sources/CustomFontsPackage/CustomFontsPackage.swift index c6be547..ada8060 100644 --- a/Sources/CustomFontsPackage/CustomFontsPackage.swift +++ b/Sources/CustomFontsPackage/CustomFontsPackage.swift @@ -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")