title: How to calculate line spacing based on font's line height in Swift?
body: <p>You can set the line spacing for attributed text in labels by the following code:</p>
  
  <pre><code>let attributedString = NSMutableAttributedString(string: "My text")
  
  let paragraphStyle = NSMutableParagraphStyle()
  
  // line spacing in points
  paragraphStyle.lineSpacing = 1.5
  
  attributedString.addAttribute(NSParagraphStyleAttributeName,
   value:paragraphStyle, range:NSMakeRange(0, attributedString.length))
  
  
  label.attributedText = attributedString
  </code></pre>
  
  <p>But whenever I check the design, I face something named <code>Line Height</code> for font which is in different scale, for example:</p>
  
  <pre><code>Font Size: 14pt
  Line Height: 18pt
  </code></pre>
  
  <p>How can I convert the number to paragraph line spacing?</p>