title: How to get the UIWebView's equivalent of the iOS 8 system font?
body: <p>I am trying to use the very same font in a UIWebView on iOS that the iOS system uses currently.</p>
  
  <p>This means I want to use the very same font I'd get from:</p>
  
  <pre><code>UIFontDescriptor *fd;
  fd = [UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody];
  UIFont *font = [UIFont fontWithDescriptor:fd size:0];
  </code></pre>
  
  <p>There are lots of answers on SO (<a href="https://stackoverflow.com/questions/449773/iphone-development-setting-uiwebview-font">iPhone Development - Setting UIWebView font</a>, <a href="https://stackoverflow.com/questions/10490696/using-custom-font-in-a-uiwebview">Using custom font in a UIWebView</a>, <a href="https://stackoverflow.com/questions/12533445/how-to-change-uiwebview-default-font">How to change UIWebView default font</a>, <a href="https://stackoverflow.com/questions/3768203/how-to-set-custom-font-in-uiwebview">How to set custom font in UIWebView?</a>) that explain how to embed a UIFont's familyName or fontName into an html's style attributes, by doing this:</p>
  
  <pre><code>NSString *fontStyle, *htmlString = @"test";
  fontStyle = [NSString stringWithFormat:@"font-family:%@;font-size:%d", font.familyName, (int)font.pointSize];
  htmlString = NSString stringWithFormat:@"&lt;span style=\"%@\"&gt;%@&lt;/span&gt;", fontStyle, htmlString];
  </code></pre>
  
  <p>But this doesn't seem to work on iOS 7 and 8 any more where these system font names are now like:</p>
  
  <pre><code>font.fontName: .HelveticaNeueInterface-Regular
  font.familyName: .Helvetica Neue Interface
  </code></pre>
  
  <p>When using these names in an UIWebView with the "font-family" attribute, the text gets rendered in the default font (which is with serifs and certainly not the new iOS system font). Removing the leading period doesn't help, either.</p>
  
  <p>So, how do I now translate the system's font into a name that gets correctly interpreted by the Web Kit?</p>
  
  <p>Please understand that I am seeking for a generic solution and do not simply seek the iOS 7/8 name I can insert manually into the html style attribute.</p>