ViFont
public class ViFont: NSObject
Font helper class. Load font bundle and check if the bundle is generated from Cocoa Pods Default font used in all widgets are Roboto For customization, refer to ViTheme method
-
Thin with size font. Will load custom font and fall back to system font if not available.
Declaration
Swift
public static func thin(with size: CGFloat) -> UIFont
Parameters
size
font size
Return Value
UIFont
-
Light with size font. Will load custom font and fall back to system font if not available.
Declaration
Swift
public static func light(with size: CGFloat) -> UIFont
Parameters
size
font size
Return Value
UIFont
-
Regular with size font. Will load custom font and fall back to system font if not available.
Declaration
Swift
public static func regular(with size: CGFloat) -> UIFont
Parameters
size
font size
Return Value
UIFont
-
Medium with size font. Will load custom font and fall back to system font if not available.
Declaration
Swift
public static func medium(with size: CGFloat) -> UIFont
Parameters
size
font size
Return Value
UIFont
-
Bold with size font. Will load custom font and fall back to system font if not available.
Declaration
Swift
public static func bold(with size: CGFloat) -> UIFont
Parameters
size
font size
Return Value
UIFont
-
Loads a given font if needed.
Declaration
Swift
public static func loadFontIfNeeded(name: String)
Parameters
name
font name