title: UITextView HTML Content With Custom Font and Size
body: <p>I've done a lot of search and can't figure out what the correct method to add html content in UITextView. Following is my code. It's not setting correct font type. </p>
  
  <pre><code>let htmlProfileString = "&lt;html&gt;&lt;head&gt;&lt;style&gt;body {font-family:\"SFProText-Regular\";font-size: 16px;color: #FFFFFF;text-decoration:none;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;" +
                          "This is content"
                          + "&lt;/body&gt;&lt;/head&gt;&lt;/html&gt;"
  
                      let htmlData = NSString(string: htmlProfileString).data(using: String.Encoding.unicode.rawValue)
  
                      let options = [NSAttributedString.DocumentReadingOptionKey.documentType: NSAttributedString.DocumentType.html]
  
                      let attributedString = try! NSAttributedString(data: htmlData!, options: options, documentAttributes: nil)
                      self.textView.attributedText = attributedString
  </code></pre>