Swiftpack.co - Package - Nirma/UIFontComplete


Build Status Swift 5.0 platforms CodeCov CocoaPods compatible Carthage compatible Swift Package Manager compatible License

Font management (System & Custom) for iOS and tvOS


No more wasted time searching for names of UIFont fonts and no more surprises at runtime if a font name was mistyped. This library is simply one extension to UIFont and one Font enum with a case for each system font on iOS and tvOS. Custom font support is also available, please keep reading for details!

Instead of using the String based constructor native to UIFont:

let font = UIFont(name: "Arial-BoldItalicMT", size: 12.0)

You can now simply start typing the name of the font enum and let code completion help you:

This library currently provides two different options for creating UIFont objects. The first is calling the font name off of the provided Font enumeration and then calling of(size:) to provide the desired size.

let myFont = Font.helvetica.of(size: 12.0)

The other UIFont creation method offered by this library is similar to the normal UIFont constructor except that instead of providing a String of the desired font, a case of the Font enum is provided instead.

let font = UIFont(font: .arialBoldItalicMT, size: 12.0)

What about Custom Fonts?

Custom Fonts can be added with the help of the FontRepresentable protocol. Simply create your own CustomFont String based enumeration that adapts the FontRepresentable and add a case per font that you want to add like so:

// In your project using custom fonts

enum CustomFont: String, FontRepresentable {
    case alexBrushRegular = "AlexBrush-Regular"

CustomFont.alexBrushRegular.of(size: 12.0) // => UIFont



If you use Carthage to manage your dependencies, simply add UIFontComplete to your Cartfile:

github "Nirma/UIFontComplete"

If you use Carthage to build your dependencies, make sure you have added UIFontComplete.framework to the "Linked Frameworks and Libraries" section of your target, and have included UIFontComplete.framework in your Carthage framework copying build phase.


If you use CocoaPods to manage your dependencies, simply add UIFontComplete to your Podfile:

pod 'UIFontComplete'


  • Xcode 9.0
  • Swift 4.0+

Contributing to UIFontComplete

Pull Requests are Welcome! If you feel that this library could be made better then please do so by sending over a pull request!


UIFontComplete is free software, and may be redistributed under the terms specified in the LICENSE file.


Stars: 1261


Used By

Total: 0


2020 End of World Edition -


This release removes some deprecated fonts and updates which fonts are available on iOS and tvOS. Some fonts are available on both platforms now, some other fonts have also been added and deleted.

Since some fonts have been retired this technically is a breaking release but not because of functionality being added or removed from this library.

If I forgot anything or you feel that something could be done better by all means FEEL FREE TO CONTRIBUTE!

P.S. 2020 is turning out to be an unstable year, looks like all bets are off at this point. Please stay safe and take care.

~ Nicko

The Package -

This release fixes package manager support.

Thanks @nuudles for putting this together!

Swift 5 -

This is simply a project modernization release, no major code changes.

TV -

This release introduces support for tvOS fonts.

Swifty Fix -

This release fixes an issue with cocoapods in a previous release.


Swift 4 -

Swift 4 Support!

This release contains no new code changes, only updated project settings so that the project be compiled in Swift 4.


Alphabet Soup -

This is a minor release with the following changes


  • The System font enum has been reorganized in Alphabetical order
  • Tests have been moved to top level "Tests" folder
  • Non essential code has been removed


This release marks this library as officially production ready.

Swift Package Manager support has also been added but is currently experimental.

Amplifier -

This is just a minor additive release that introduces a convenience method for of(size:) that allows the use of the more natural Double type rather than forcing the user to use a CGFloat.

Fonts just for you! -

This release enables the use of custom fonts thanks to the addition of FontRepresentable. Please see the README for details!

Thanks @matsune for putting this together!

Fellowship of UIFont -

This release introduces a handy extension to Font that takes a size and returns a UIFont object. See the updated README for details!

@jrtibbetts Thanks for making this!


Minor improvements, not API additions.


Power of Enums -

First Release!