Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 4
System.Windows
 FontVariants Enumeration
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
.NET Framework Class Library
FontVariants Enumeration

Renders variant typographic glyph forms.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
Visual Basic
Public Enumeration FontVariants
C#
public enum FontVariants
Visual C++
public enum class FontVariants
F#
type FontVariants
XAML Attribute Usage
<object property="enumerationMemberName" .../>
Member nameDescription
NormalDefault font behavior. Font scaling and positioning is normal.
SuperscriptReplaces a default glyph with a superscript glyph. Superscript is commonly used for footnotes.
SubscriptReplaces a default glyph with a subscript glyph.
OrdinalReplaces a default glyph with an ordinal glyph, or it may combine glyph substitution with positioning adjustments for proper placement. Ordinal forms are normally associated with numeric notation of an ordinal word, such as "1st" for "first."
InferiorReplaces a default glyph with an inferior glyph, or it may combine glyph substitution with positioning adjustments for proper placement. Inferior forms are typically used in chemical formulas or mathematical notation.
RubyReplaces a default glyph with a smaller Japanese Kana glyph. This is used to clarify the meaning of Kanji, which may be unfamiliar to the reader.

If a specified font does not support a particular glyph set, the default glyphs are displayed.

The Variants property allows you to set superscript and subscript values for an OpenType font.

The following text displays superscripts for the Palatino Linotype font.

Example of superscripts

Text using OpenType superscripts

The following code example shows how to define superscripts for the Palatino Linotype font, using properties of the Typography object.

XAML
<Paragraph FontFamily="Palatino Linotype">
  2<Run Typography.Variants="Superscript">3</Run>
  14<Run Typography.Variants="Superscript">th</Run>
</Paragraph>

The following text displays subscripts for the Palatino Linotype font.

Example of subscripts

Text using OpenType subscripts

The following code example shows how to define subscripts for the Palatino Linotype font, using properties of the Typography object.

XAML
<Paragraph FontFamily="Palatino Linotype">
  H<Run Typography.Variants="Subscript">2</Run>O
  Footnote<Run Typography.Variants="Subscript">4</Run>
</Paragraph>

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker