Typography Class
Provides access to a rich set of OpenType typography properties.
Assembly: PresentationFramework (in PresentationFramework.dll)
The Typography object exposes the set of features that an OpenType font supports. By setting the properties of Typography in markup or code, you can easily author documents that take advantage of OpenType features.
The following text displays standard capital letters for the Pescadero font, followed by the letters styled as "SmallCaps" and "AllSmallCaps". In this case, the same font size is used for all three words.

The following markup example shows how to define capitals for the Pescadero font, using properties of the Typography object. When the "SmallCaps" format is used, any leading capital letter is ignored.
<Paragraph FontFamily="Pescadero" FontSize="48"> <Run>CAPITALS</Run> <Run Typography.Capitals="SmallCaps">Capitals</Run> <Run Typography.Capitals="AllSmallCaps">Capitals</Run> </Paragraph>
The following code example accomplishes the same task as the previous markup example.
MyParagraph.FontFamily = new FontFamily("Pescadero"); MyParagraph.FontSize = 48; Run run_1 = new Run("CAPITALS "); MyParagraph.Inlines.Add(run_1); Run run_2 = new Run("Capitals "); run_2.Typography.Capitals = FontCapitals.SmallCaps; MyParagraph.Inlines.Add(run_2); Run run_3 = new Run("Capitals"); run_3.Typography.Capitals = FontCapitals.AllSmallCaps; MyParagraph.Inlines.Add(run_3); MyParagraph.Inlines.Add(new LineBreak());
Typography Properties
The following table lists the properties, values, and default value of the Typography object.
Property | Value(s) | Default Value |
|---|---|---|
Numeric value - byte | 0 | |
AllPetiteCaps | AllSmallCaps | Normal | PetiteCaps | SmallCaps | Titling | Unicase | ||
false | ||
false | ||
true | ||
true | ||
Numeric value - byte | 0 | |
false | ||
false | ||
HojoKanji | Jis04 | Jis78 | Jis83 | Jis90 | NlcKanji | Normal | Simplified | Traditional | TraditionalNames | ||
false | ||
false | ||
true | ||
false | ||
false | ||
true | ||
numeric value – byte | 0 | |
numeric value – byte | 0 | |
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
false | ||
Inferior | Normal | Ordinal | Ruby | Subscript | Superscript |
All dependency properties of this class also have an attached property usage in XAML. For instance, you can set the AnnotationAlternates property through this syntax: <object Typography.AnnotationAlternates="value".../>
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.