title: NSAttributedString superscript styling
body: <p>I want to superscript all the instances of ® character in a block of text (legal disclaimer, naturally ;)) and the default way <code>NSAttributedString</code> is not very good.</p>
  
  <p>If I just let the character be and only use unmodified <code>NSString</code>, it is rendered the same size as a capital letter and is placed approximately at the baseline. If I add the superscript attribute to <code>NSAttributedString</code> as follows:</p>
  
  <pre><code>[attrStr setAttributes:@{(NSString *)kCTSuperscriptAttributeName : @1} range:NSMakeRange(locationOfReg, 1)];
  </code></pre>
  
  <p>The character is lifted off the baseline, its size is unchanged, but the line spacing is now affected because the raised character would otherwise intrude on the line above. </p>
  
  <p>To illustrate:</p>
  
  <p><img src="https://i.stack.imgur.com/C8MHi.png" alt="variants of (R)"></p>
  
  <p>I created this image in Photoshop where the desired position was achieved by reducing the size of the character and shifting the baseline. I know how to change the font size in iOS, but changing the baseline seems trickier. Any suggestions on how to achieve this?</p>
  
  <p>Edit: I suppose I could use the superscript attribute as a way to shift the baseline up. Now it would be great to figure out a way to get the current font size and subsequently reduce it to allow the same method to be used on blocks of text of different size.</p>