title: Why iOS13 changes the font-family inside NSAttributedString for paragraphs <p>
body: <p>My application uses NSAttributedString to display text to the user. Most of this text is inside the paragraph HTML tags (<code>&lt;p&gt;</code>). When it's inside the tags, the font family is changed to some Times style.<br>
  It happend in the new version iOS 13, before we did not hve this problem.</p>
  
  <p>On this image you can see normal font and the modified font when it is in the <p> tags: <a href="https://imgur.com/a/YY3Gdph" rel="noreferrer">https://imgur.com/a/YY3Gdph</a></p>
  
  <p>We don't know where to start looking for the solution.</p>
  
  <pre class="lang-swift prettyprint-override"><code>let font = UIFont.preferredFont(forTextStyle: .body)
  let strDesc: String = "\(explanation)\n"
  let newStringDesc = strDesc.replacingOccurrences(of: "&lt;/ul&gt;", with: "&lt;/ul&gt;&lt;br&gt;")
  
  let modifiedString = "&lt;style&gt;body{font-family: '\(font.fontName)'; font-size:\(font.pointSize)px;}&lt;/style&gt;\(strDesc)"
  guard let data = modifiedString.data(using: .utf8) else { return nil }
  
  let attrString = try NSMutableAttributedString(
      data: data,
      options: [
                NSAttributedString.DocumentReadingOptionKey.documentType: NSAttributedString.DocumentType.html,
  
  NSAttributedString.DocumentReadingOptionKey.characterEncoding: String.Encoding.utf8.rawValue,
                  ],
      documentAttributes: nil
  )
  attrString.addCustomParagraphSettings(font: font)
  attrString.setCustomParagraphFontColor()
  
  let mainAttributedText = NSMutableAttributedString()
  
  mainAttributedText.append(attrString)
  mainAttributedText.append(tmpTakenText)
  descriptionTextView.attributedText = mainAttributedText
  </code></pre>
  
  <p>I expect to see standard iOS font.</p>