Ligatures are two or more glyphs that are formed into a single glyph in order to create more readable or attractive text. OpenType fonts support four types of ligatures:
Standard ligatures. Designed to enhance readability. Standard ligatures include "fi", "fl", and "ff".
Contextual ligatures. Designed to enhance readability by providing better joining behavior between the characters that make up the ligature.
Discretionary ligatures. Designed to be ornamental, and not specifically designed for readability.
Historical ligatures. Designed to be historical, and not specifically designed for readability.
The following text displays standard ligature glyphs for the Pericles font.
Text using OpenType standard ligatures
.gif)
The following markup example shows how to define standard ligature glyphs for the Pericles font, using properties of the Typography object.
|
<Paragraph FontFamily="Pericles" Typography.StandardLigatures="True">
<Run Typography.StylisticAlternates="1">FI</Run>
<Run Typography.StylisticAlternates="1">FL</Run>
<Run Typography.StylisticAlternates="1">TH</Run>
<Run Typography.StylisticAlternates="1">TT</Run>
<Run Typography.StylisticAlternates="1">TV</Run>
<Run Typography.StylisticAlternates="1">TW</Run>
<Run Typography.StylisticAlternates="1">TY</Run>
<Run Typography.StylisticAlternates="1">VT</Run>
<Run Typography.StylisticAlternates="1">WT</Run>
<Run Typography.StylisticAlternates="1">YT</Run>
</Paragraph>
|
The following text displays discretionary ligature glyphs for the Pericles font.
Text using OpenType discretionary ligatures
.gif)
The following markup example shows how to define discretionary ligature glyphs for the Pericles font, using properties of the Typography object.
|
<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>
|
By default, OpenType fonts in Windows Presentation Foundation (WPF) enable standard ligatures. For example, if you use the Palatino Linotype font, the standard ligatures "fi", "ff", and "fl" appear as a combined character glyph. Notice that the pair of characters for each standard ligature touch each other.
Text using OpenType standard ligatures
.gif)
However, you can disable standard ligature features so that a standard ligature such as "ff" displays as two separate glyphs, rather than as a combined character glyph.
Text using disabled OpenType standard ligatures
.gif)
The following markup example shows how to disable standard ligature glyphs for the Palatino Linotype font, using properties of the Typography object.
|
<!-- Set standard ligatures to false in order to disable feature. -->
<Paragraph Typography.StandardLigatures="False" FontFamily="Palatino Linotype" FontSize="72">
fi ff fl
</Paragraph>
|