title: Detect whether a font supports variants (like superscript and subscript)
body: <p>WPF has the <a href="http://msdn.microsoft.com/en-us/library/system.windows.documents.typography.variants.aspx" rel="nofollow noreferrer">Typography.Variants</a> attached property that lets you do superscript and subscript. However, it only works for some fonts. For other fonts, the variant is utterly ignored, and the text is shown normally. (Code sample and screenshot <a href="https://stackoverflow.com/questions/1252114/superscript-subscript-in-hyperlink-in-wpf">here</a>)</p>
  
  <p>Since it silently falls back to a no-op, I have no idea that anything went wrong; but my user will see lousy behavior.</p>
  
  <p><strong>Is there any way that I can programmatically detect whether a given font supports Typography.Variants?</strong> If so, I could provide more meaningful behavior if the user selected a non-variant-supporting font for something that needs superscripts/subscripts.</p>
  
  <p>I looked at <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.glyphtypeface_members.aspx" rel="nofollow noreferrer">GlyphTypeface</a>, since it's the one you use to query whether a font can be embedded, but I didn't see anything there about variants. I also didn't see anything obvious on <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.fontfamily_members.aspx" rel="nofollow noreferrer">FontFamily</a>, and the only thing I could find on <a href="http://msdn.microsoft.com/en-us/library/system.windows.documents.typography_members.aspx" rel="nofollow noreferrer">Typography</a> was the Variants attached property itself (and its getters and setters).</p>