Skip to content
James Barrow edited this page Jan 29, 2017 · 3 revisions

CustomFonts

:FontAwesome Links:

loadCustomFonts()

Loads custom fonts imbedded in the Framework.

Declaration

Swift

public class func loadCustomFonts()


---

<br>

### loadCustomFonts(names:bundle:)
Load custom fonts with names including the file name and extension.

**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public class func loadCustomFonts(names: [String], bundle: Bundle = Bundle.main)

Parameters

`names` An array of strings of the font file names.
`bundle` The bundle to look for the file names in. By default this uses the main app bundle.


loadCustomFont(name:withExtension:bundle:)

Load a custom font from it’s name and extention from within the bundle without having to declare it in the Info.plist.

Declaration

Swift

public class func loadCustomFont(name: String, withExtension ext: String, bundle: Bundle = Bundle.main)


**Parameters**
<table>
<tr><td> `name` </td><td> The name of the font file name. </td></tr>
<tr><td> `ext` </td><td> The extention of the file. </td></tr>
<tr><td> `bundle` </td><td> The bundle the files are located in. By default this uses the main app bundle. </td></tr>
<table>

---

<br>

### printAllFontFamilies()
Loops though all the fonts families loaded onto the device and prints them to the console.

**Declaration**
> <sub>**Swift**</sub>  
> ```swift  
public class func printAllFontFamilies()

Clone this wiki locally