A tiny Playground for UIFont. Inspect title to visualize attributes.
Usage: clone this gist and rename the folder to Fonts.playground.
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <playground version='3.0' sdk='iphonesimulator'> | |
| <sections> | |
| <code source-file-name='section-1.swift'/> | |
| </sections> | |
| <timeline fileName='timeline.xctimeline'/> | |
| </playground> |
| import UIKit | |
| UIFont.familyNames() | |
| UIFont.fontNamesForFamilyName("Avenir Next") | |
| let attributes = [NSFontAttributeName: UIFont(name: "AvenirNext-UltraLightItalic", size: 28.0)] | |
| let text = NSMutableAttributedString(string: "the quick brown fox jumps over the lazy dog", attributes: attributes) |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Timeline | |
| version = "3.0"> | |
| <TimelineItems> | |
| <LoggerValueHistoryTimelineItem | |
| documentLocation = "#CharacterRangeLen=20&CharacterRangeLoc=15&EndingColumnNumber=21&EndingLineNumber=2&StartingColumnNumber=1&StartingLineNumber=2&Timestamp=435558329.975895"> | |
| </LoggerValueHistoryTimelineItem> | |
| <LoggerValueHistoryTimelineItem | |
| documentLocation = "#CharacterRangeLen=44&CharacterRangeLoc=36&EndingColumnNumber=45&EndingLineNumber=3&StartingColumnNumber=1&StartingLineNumber=3&Timestamp=435558329.975895"> | |
| </LoggerValueHistoryTimelineItem> | |
| <LoggerValueHistoryTimelineItem | |
| documentLocation = "#CharacterRangeLen=4&CharacterRangeLoc=183&EndingColumnNumber=9&EndingLineNumber=7&StartingColumnNumber=5&StartingLineNumber=7&Timestamp=435558329.975895"> | |
| </LoggerValueHistoryTimelineItem> | |
| </TimelineItems> | |
| </Timeline> |