title: UILabel containing HTML/Attributed Text - how to scale when inside a UIScrollView
body: <p>I do have a UIScrollView only containing a UILabel. The UILabel contains an NSAttributedString made out of HTML:</p>
  
  <pre><code>let str = try NSAttributedString(data: content.data(using: String.Encoding.unicode, allowLossyConversion: true)!, options: [NSDocumentTypeDocumentAttribute : NSHTMLTextDocumentType], documentAttributes: nil)
  </code></pre>
  
  <p>Now I would like to let the user zoom the label to have everything bigger. When only using</p>
  
  <pre><code>func viewForZooming(in scrollView: UIScrollView) -&gt; UIView?
  </code></pre>
  
  <p>everything works as expected, but the font gets blurry. I tried changing the font size after zooming:</p>
  
  <pre><code>func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) {
      myLabel.setFontSize(pointSize: scrollView.zoomScale)
  }
  </code></pre>
  
  <p>with the function being the following:</p>
  
  <pre><code>extension UILabel {
      func setFontSize(pointSize: CGFloat) {
          let fullRange = NSRange(location: 0, length: text!.count)
          let mutableAttributeText = NSMutableAttributedString(attributedString: attributedText!)
          mutableAttributeText.enumerateAttribute(NSFontAttributeName, in: fullRange, options: NSAttributedString.EnumerationOptions.longestEffectiveRangeNotRequired) {
          (attribute: Any!, range: NSRange, stop: UnsafeMutablePointer&lt;ObjCBool&gt;) -&gt; Void in
          if let attributeFont = attribute as? UIFont {
              let newPointSize = 12 * pointSize
              let scaledFont = UIFont(descriptor: attributeFont.fontDescriptor, size: newPointSize)
              mutableAttributeText.addAttribute(NSFontAttributeName, value: scaledFont, range: range)
          }
      }
      attributedText = mutableAttributeText
  }
  </code></pre>
  
  <p>}</p>
  
  <p>But then the text is not positioned exactly the same as before. Now what's the best way to let the user zoom in and out and have the text still sharp? I'm using auto layout to position the label inside UIScrollView.</p>