Typography.DiscretionaryLigatures Property

 

Gets or sets a value that determines whether discretionary ligatures are enabled.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool DiscretionaryLigatures { get; set; }

Property Value

Type: System.Boolean

true if discretionary ligatures are enabled; otherwise, false. The default value is false.

This property gets or sets a value on the object that owns a Typography property, which is the only way to access a Typography class instance. In addition, this property supports an attached property usage so that it can be set on text-containing objects in XAML.

Discretionary ligatures are designed to be ornamental, and not specifically designed for readability. The following text displays discretionary ligature glyphs for the Pericles font.

Text using OpenType discretionary ligatures

Example of discretionary set of ligatures

The following code example shows how to define discretionary ligature glyphs for the Pericles font, using the DiscretionaryLigatures property.

<Paragraph FontFamily="Pericles" Typography.DiscretionaryLigatures="True">
  <Run Typography.StylisticAlternates="1">CO</Run>
  <Run Typography.StylisticAlternates="1">LA</Run>
  <Run Typography.StylisticAlternates="1">LE</Run>
  <Run Typography.StylisticAlternates="1">LI</Run>
  <Run Typography.StylisticAlternates="1">LL</Run>
  <Run Typography.StylisticAlternates="1">LO</Run>
  <Run Typography.StylisticAlternates="1">LU</Run>
</Paragraph>

<object Typography.DiscretionaryLigatures="bool"/>

.NET Framework
Available since 3.0
Return to top
Show: