Expand Minimize

Typography class

Applies to Windows and Windows Phone

Provides access to a set of Microsoft OpenType typography properties. These properties are implemented as XAML attached properties such that they can be set from text object model properties as well as from specific text controls.

Inheritance

Object
  Typography

Syntax


public sealed class Typography

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The Typography class has these types of members:

Methods

The Typography class has these methods. It also inherits methods from the Object class.

MethodDescription
GetAnnotationAlternates Returns the value of the AnnotationAlternates attached property for a specified dependency object.
GetCapitals Returns the value of the Capitals attached property for a specified dependency object.
GetCapitalSpacing Returns the value of the CapitalSpacing attached property for a specified dependency object.
GetCaseSensitiveForms Returns the value of the CaseSensitiveForms attached property for a specified dependency object.
GetContextualAlternates Returns the value of the ContextualAlternates attached property for a specified dependency object.
GetContextualLigatures Returns the value of the ContextualLigatures attached property for a specified dependency object.
GetContextualSwashes Returns the value of the ContextualSwashes attached property for a specified dependency object.
GetDiscretionaryLigatures Returns the value of the DiscretionaryLigatures attached property for a specified dependency object.
GetEastAsianExpertForms Returns the value of the EastAsianExpertForms attached property for a specified dependency object.
GetEastAsianLanguage Returns the value of the EastAsianLanguage attached property for a specified dependency object.
GetEastAsianWidths Returns the value of the EastAsianWidths attached property for a specified dependency object.
GetFraction Returns the value of the Fraction attached property for a specified dependency object.
GetHistoricalForms Returns the value of the HistoricalForms attached property for a specified dependency object.
GetHistoricalLigatures Returns the value of the HistoricalLigatures attached property for a specified dependency object.
GetKerning Returns the value of the Kerning attached property for a specified dependency object.
GetMathematicalGreek Returns the value of the MathematicalGreek attached property for a specified dependency object.
GetNumeralAlignment Returns the value of the NumeralAlignment attached property for a specified dependency object.
GetNumeralStyle Returns the value of the NumeralStyle attached property for a specified dependency object.
GetSlashedZero Returns the value of the SlashedZero attached property for a specified dependency object.
GetStandardLigatures Returns the value of the StandardLigatures attached property for a specified dependency object.
GetStandardSwashes Returns the value of the StandardSwashes attached property for a specified dependency object.
GetStylisticAlternates Returns the value of the StylisticAlternates attached property for a specified dependency object.
GetStylisticSet1 Returns the value of the StylisticSet1 attached property for a specified dependency object.
GetStylisticSet10 Returns the value of the StylisticSet10 attached property for a specified dependency object.
GetStylisticSet11 Returns the value of the StylisticSet11 attached property for a specified dependency object.
GetStylisticSet12 Returns the value of the StylisticSet12 attached property for a specified dependency object.
GetStylisticSet13 Returns the value of the StylisticSet13 attached property for a specified dependency object.
GetStylisticSet14 Returns the value of the StylisticSet14 attached property for a specified dependency object.
GetStylisticSet15 Returns the value of the StylisticSet15 attached property for a specified dependency object.
GetStylisticSet16 Returns the value of the StylisticSet16 attached property for a specified dependency object.
GetStylisticSet17 Returns the value of the StylisticSet17 attached property for a specified dependency object.
GetStylisticSet18 Returns the value of the StylisticSet18 attached property for a specified dependency object.
GetStylisticSet19 Returns the value of the StylisticSet19 attached property for a specified dependency object.
GetStylisticSet2 Returns the value of the StylisticSet2 attached property for a specified dependency object.
GetStylisticSet20 Returns the value of the StylisticSet20 attached property for a specified dependency object.
GetStylisticSet3 Returns the value of the StylisticSet3 attached property for a specified dependency object.
GetStylisticSet4 Returns the value of the StylisticSet4 attached property for a specified dependency object.
GetStylisticSet5 Returns the value of the StylisticSet5 attached property for a specified dependency object.
GetStylisticSet6 Returns the value of the StylisticSet6 attached property for a specified dependency object.
GetStylisticSet7 Returns the value of the StylisticSet7 attached property for a specified dependency object.
GetStylisticSet8 Returns the value of the StylisticSet8 attached property for a specified dependency object.
GetStylisticSet9 Returns the value of the StylisticSet9 attached property for a specified dependency object.
GetVariants Returns the value of the Variants attached property for a specified dependency object.
SetAnnotationAlternates Sets the value of the AnnotationAlternates attached property for a specified dependency object.
SetCapitals Sets the value of the Capitals attached property for a specified dependency object.
SetCapitalSpacing Sets the value of the CapitalSpacing attached property for a specified dependency object.
SetCaseSensitiveForms Sets the value of the CaseSensitiveForms attached property for a specified dependency object.
SetContextualAlternates Sets the value of the ContextualAlternates attached property for a specified dependency object.
SetContextualLigatures Sets the value of the ContextualLigatures attached property for a specified dependency object.
SetContextualSwashes Sets the value of the ContextualSwashes attached property for a specified dependency object.
SetDiscretionaryLigatures Sets the value of the DiscretionaryLigatures attached property for a specified dependency object.
SetEastAsianExpertForms Sets the value of the EastAsianExpertForms attached property for a specified dependency object.
SetEastAsianLanguage Sets the value of the EastAsianLanguage attached property for a specified dependency object.
SetEastAsianWidths Sets the value of the EastAsianWidths attached property for a specified dependency object.
SetFraction Sets the value of the Fraction attached property for a specified dependency object.
SetHistoricalForms Sets the value of the HistoricalForms attached property for a specified dependency object.
SetHistoricalLigatures Sets the value of the HistoricalLigatures attached property for a specified dependency object.
SetKerning Sets the value of the Kerning attached property for a specified dependency object.
SetMathematicalGreek Sets the value of the MathematicalGreek attached property for a specified dependency object.
SetNumeralAlignment Sets the value of the NumeralAlignment attached property for a specified dependency object.
SetNumeralStyle Sets the value of the NumeralStyle attached property for a specified dependency object.
SetSlashedZero Sets the value of the SlashedZero attached property for a specified dependency object.
SetStandardLigatures Sets the value of the StandardLigatures attached property for a specified dependency object.
SetStandardSwashes Sets the value of the StandardSwashes attached property for a specified dependency object.
SetStylisticAlternates Sets the value of the StylisticAlternates attached property for a specified dependency object.
SetStylisticSet1 Sets the value of the StylisticSet1 attached property for a specified dependency object.
SetStylisticSet10 Sets the value of the StylisticSet10 attached property for a specified dependency object.
SetStylisticSet11 Sets the value of the StylisticSet11 attached property for a specified dependency object.
SetStylisticSet12 Sets the value of the StylisticSet12 attached property for a specified dependency object.
SetStylisticSet13 Sets the value of the StylisticSet13 attached property for a specified dependency object.
SetStylisticSet14 Sets the value of the StylisticSet14 attached property for a specified dependency object.
SetStylisticSet15 Sets the value of the StylisticSet15 attached property for a specified dependency object.
SetStylisticSet16 Sets the value of the StylisticSet16 attached property for a specified dependency object.
SetStylisticSet17 Sets the value of the StylisticSet17 attached property for a specified dependency object.
SetStylisticSet18 Sets the value of the StylisticSet18 attached property for a specified dependency object.
SetStylisticSet19 Sets the value of the StylisticSet19 attached property for a specified dependency object.
SetStylisticSet2 Sets the value of the StylisticSet2 attached property for a specified dependency object.
SetStylisticSet20 Sets the value of the StylisticSet20 attached property for a specified dependency object.
SetStylisticSet3 Sets the value of the StylisticSet3 attached property for a specified dependency object.
SetStylisticSet4 Sets the value of the StylisticSet4 attached property for a specified dependency object.
SetStylisticSet5 Sets the value of the StylisticSet5 attached property for a specified dependency object.
SetStylisticSet6 Sets the value of the StylisticSet6 attached property for a specified dependency object.
SetStylisticSet7 Sets the value of the StylisticSet7 attached property for a specified dependency object.
SetStylisticSet8 Sets the value of the StylisticSet8 attached property for a specified dependency object.
SetStylisticSet9 Sets the value of the StylisticSet9 attached property for a specified dependency object.
SetVariants Sets the value of the Variants attached property for a specified dependency object.

 

Attached Properties

The Typography class has these attached properties.

Access typeDescription

Typography.AnnotationAlternates

Read/writeGets or sets a value that specifies the index of an alternate annotation form.

Typography.Capitals

Read/writeGets or sets a FontCapitals value that indicates the capital form of the selected font.

Typography.CapitalSpacing

Read/writeGets or sets a value that determines whether inter-glyph spacing for all-capital text is globally adjusted to improve readability.

Typography.CaseSensitiveForms

Read/writeGets or sets a value that determines whether glyphs adjust their vertical position to better align with uppercase glyphs.

Typography.ContextualAlternates

Read/writeGets or sets a value that determines whether custom glyph forms can be used based upon the context of the text being rendered.

Typography.ContextualLigatures

Read/writeGets or sets a value that determines whether contextual ligatures are enabled.

Typography.ContextualSwashes

Read/writeGets or sets a value that specifies the index of a contextual swashes form.

Typography.DiscretionaryLigatures

Read/writeGets or sets a value that determines whether discretionary ligatures are enabled.

Typography.EastAsianExpertForms

Read/writeGets or sets a value that determines whether the standard Japanese font forms have been replaced with the corresponding preferred typographic forms.

Typography.EastAsianLanguage

Read/writeGets or sets a FontEastAsianLanguage value that indicates glyphs used for a specific writing system or language.

Typography.EastAsianWidth

Read/writeGets or sets a FontEastAsianWidths value that indicates the proportional width for Latin characters in an East Asian font.

Typography.Fraction

Read/writeGets or sets a FontFraction value that indicates the fraction style.

Typography.HistoricalForms

Read/writeGets or sets a value that determines whether historical forms are enabled.

Typography.HistoricalLigatures

Read/writeGets or sets a value that indicates whether historical ligatures are enabled.

Typography.Kerning

Read/writeGets or sets a value that indicates whether kerning is enabled.

Typography.MathematicalGreek

Read/writeGets or sets a value that indicates whether standard typographic font forms of Greek glyphs have been replaced with corresponding font forms commonly used in mathematical notation.

Typography.NumeralAlignment

Read/writeGets or sets a FontNumeralAlignment value that indicates the alignment of widths for numerals.

Typography.NumeralStyle

Read/writeGets or sets a FontNumeralStyle value that determines the set of glyphs that are used to render numeric alternate font forms.

Typography.SlashedZero

Read/writeGets or sets a value that indicates whether a nominal zero font form should be replaced with a slashed zero.

Typography.StandardLigatures

Read/writeGets or sets a value that indicates whether standard ligatures are enabled.

Typography.StandardSwashes

Read/writeGets or sets a value that specifies the index of a standard swashes form.

Typography.StylisticAlternates

Read/writeGets or sets a value that specifies the index of a stylistic alternates form.

Typography.StylisticSet1

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet10

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet11

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet12

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet13

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet14

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet15

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet16

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet17

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet18

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet19

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet2

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet20

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet3

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet4

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet5

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet6

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet7

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet8

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.StylisticSet9

Read/writeGets or sets a value that indicates whether a stylistic set of a font form is enabled.

Typography.Variants

Read/writeGets or sets a FontVariants value that indicates a variation of the standard typographic form to be used.

 

Properties

The Typography class has these properties.

PropertyAccess typeDescription

AnnotationAlternatesProperty

Read-onlyIdentifies the AnnotationAlternates attached property.

CapitalSpacingProperty

Read-onlyIdentifies the CapitalSpacing attached property.

CapitalsProperty

Read-onlyIdentifies the Capitals attached property.

CaseSensitiveFormsProperty

Read-onlyIdentifies the CaseSensitiveForms attached property.

ContextualAlternatesProperty

Read-onlyIdentifies the ContextualAlternates attached property.

ContextualLigaturesProperty

Read-onlyIdentifies the ContextualLigatures attached property.

ContextualSwashesProperty

Read-onlyIdentifies the ContextualSwashes attached property.

DiscretionaryLigaturesProperty

Read-onlyIdentifies the DiscretionaryLigatures attached property.

EastAsianExpertFormsProperty

Read-onlyIdentifies the EastAsianExpertForms attached property.

EastAsianLanguageProperty

Read-onlyIdentifies the EastAsianLanguage attached property.

EastAsianWidthsProperty

Read-onlyIdentifies the EastAsianWidths attached property.

FractionProperty

Read-onlyIdentifies the Fraction attached property.

HistoricalFormsProperty

Read-onlyIdentifies the HistoricalForms attached property.

HistoricalLigaturesProperty

Read-onlyIdentifies the HistoricalLigatures attached property.

KerningProperty

Read-onlyIdentifies the Kerning attached property.

MathematicalGreekProperty

Read-onlyIdentifies the MathematicalGreek attached property.

NumeralAlignmentProperty

Read-onlyIdentifies the NumeralAlignment attached property.

NumeralStyleProperty

Read-onlyIdentifies the NumeralStyle attached property.

SlashedZeroProperty

Read-onlyIdentifies the SlashedZero attached property.

StandardLigaturesProperty

Read-onlyIdentifies the StandardLigatures attached property.

StandardSwashesProperty

Read-onlyIdentifies the StandardSwashes attached property.

StylisticAlternatesProperty

Read-onlyIdentifies the StylisticAlternates attached property.

StylisticSet10Property

Read-onlyIdentifies the StylisticSet10 attached property.

StylisticSet11Property

Read-onlyIdentifies the StylisticSet11 attached property.

StylisticSet12Property

Read-onlyIdentifies the StylisticSet12 attached property.

StylisticSet13Property

Read-onlyIdentifies the StylisticSet13 attached property.

StylisticSet14Property

Read-onlyIdentifies the StylisticSet14 attached property.

StylisticSet15Property

Read-onlyIdentifies the StylisticSet15 attached property.

StylisticSet16Property

Read-onlyIdentifies the StylisticSet16 attached property.

StylisticSet17Property

Read-onlyIdentifies the StylisticSet17 attached property.

StylisticSet18Property

Read-onlyIdentifies the StylisticSet18 attached property.

StylisticSet19Property

Read-onlyIdentifies the StylisticSet19 attached property.

StylisticSet1Property

Read-onlyIdentifies the StylisticSet1 attached property.

StylisticSet20Property

Read-onlyIdentifies the StylisticSet20 attached property.

StylisticSet2Property

Read-onlyIdentifies the StylisticSet2 attached property.

StylisticSet3Property

Read-onlyIdentifies the StylisticSet3 attached property.

StylisticSet4Property

Read-onlyIdentifies the StylisticSet4 attached property.

StylisticSet5Property

Read-onlyIdentifies the StylisticSet5 attached property.

StylisticSet6Property

Read-onlyIdentifies the StylisticSet6 attached property.

StylisticSet7Property

Read-onlyIdentifies the StylisticSet7 attached property.

StylisticSet8Property

Read-onlyIdentifies the StylisticSet8 attached property.

StylisticSet9Property

Read-onlyIdentifies the StylisticSet9 attached property.

VariantsProperty

Read-onlyIdentifies the Variants attached property.

 

Remarks

The Typography object exposes the set of features that the OpenType font supports. By setting the properties of Typography in markup or code, you can author documents that take advantage of OpenType features, and turn those features on at a per-element level if desired.

Some fonts contain stylistic variant glyphs that correspond to portions of a character set. Glyphs in stylistic sets may be designed to harmonize visually, interact in particular ways, or work together in other ways. Some of these variants are identified by particular conventions, for example the font might have discretionary ligatures. In this example case, the typography behavior can be enabled by setting Typography.DiscretionaryLigatures to true. Other stylistic variants are not identified by any OpenType set or convention, and are instead specific to that particular font's typography design. These variants can be accessed by setting any of the StylisticSet# attached properties to true.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Documents
Windows::UI::Xaml::Documents [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft