Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BonMot Lightning Talk @ NSNorth 2016

BonMot Lightning Talk @ NSNorth 2016

Learn about BonMot, a library for making beautiful typography on iOS.

Zev Eisenberg

April 30, 2016
Tweet

More Decks by Zev Eisenberg

Other Decks in Technology

Transcript

  1. 8:21 PM - 13 Mar 2015 NSAttributedString is great because

    it’s the result of years of research that have shown coupling between data and presentation to be ideal. @hyperspacemark Mark Adams
  2. let label = UILabel() let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.lineHeightMultiple =

    0.7 paragraphStyle.alignment = .Center let attributes = [ NSFontAttributeName: UIFont.systemFontOfSize(150), NSForegroundColorAttributeName: UIColor.whiteColor(), NSParagraphStyleAttributeName: paragraphStyle, ] label.attributedText = NSAttributedString( string: “Lightning talk", attributes: attributes) Lightning talk
  3. let label = UILabel() let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.lineHeightMultiple =

    0.7 paragraphStyle.alignment = .Center let attributes = [ NSFontAttributeName: UIFont.systemFontOfSize(150), NSForegroundColorAttributeName: UIColor.whiteColor(), NSParagraphStyleAttributeName: paragraphStyle, ] label.attributedText = NSAttributedString( string: "Lightning talk", attributes: attributes) Lightning talk
  4. let baseChain = BONChain() .color(.whiteColor()) .font(.systemFontOfSize(50)) let bookChain = baseChain

    .alignment(.Left) let yearChain = baseChain .alignment(.Right) Metropolis 1925 1984 1949 Fever 1973 2000 Peter Pan 1911 Catch-22 1961
  5. let baseChain = BONChain() .color(.whiteColor()) .font(.systemFontOfSize(50)) let bookChain = baseChain

    .alignment(.Left) let yearChain = baseChain .figureSpacing(.Tabular) .alignment(.Right) Metropolis 1925 1984 1949 Fever 1973 2000 Peter Pan 1911 Catch-22 1961
  6. let baseChain = BONChain() .color(.whiteColor()) .font(.systemFontOfSize(50)) let bookChain = baseChain

    .alignment(.Left) .pointTracking(22) let yearChain = baseChain .figureSpacing(.Tabular) .alignment(.Right) M e t r o p o l i s 1925 1 9 8 4 1949 F e v e r 1 9 7 3 2000 P e t e r P a n 1911 C a t c h - 2 2 1961
  7. I went to NSNorth, and it was not too cold!

    Je suis allé à NSNorth, et il n’était pas trop froid!
  8. "I went to <title>NSNorth</title>, and it was not <emphasis>too</emphasis> cold!"

    let styles = [ "title": BONChain()..., "emphasis": BONChain()..., ] I went to NSNorth, and it was not too cold!
  9. "I went to <title>NSNorth</title>, and it was not <emphasis>too</emphasis> cold!"

    let styles = [ "title": BONChain()..., "emphasis": BONChain()..., ] "Je suis allé à <title>NSNorth</title>, et il <emphasis>n’</emphasis>était <emphasis>pas</emphasis> trop froid!" I went to NSNorth, and it was not too cold! Je suis allé à NSNorth, et il n’était pas trop froid!