title: Change font size of NSAttributedString
body: <p>My app get some HTML formatted text from a website and I would like to change the font size of the <code>NSAttributedString</code> and display it in a textview</p>
  
  <pre><code>var htmlString : String //the html formatted text
  textView.attributedText = handleHtml(htmlString) // this is how I call the function, but the font size didn't change
  
  func handleHtml(string : String) -&gt; NSAttributedString{
      let attrs = [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSFontAttributeName: UIFont.systemFontOfSize(20.0)]
      var returnStr = NSAttributedString()
      do {
          returnStr = try NSAttributedString(data: string.dataUsingEncoding(NSUnicodeStringEncoding, allowLossyConversion: true)!, options: attrs, documentAttributes: nil)
      } catch {
          print(error)
      }
      return returnStr
  }
  </code></pre>
  
  <p>I tried <code>[NSFontAttributeName: UIFont.systemFontOfSize(20.0)]</code> as shown in the above code but the font size didn't changed. </p>