GlyphTypeface.AdvanceHeights Property

Gets the advance heights for the glyphs represented by the GlyphTypeface object.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public IDictionary<ushort, double> AdvanceHeights { get; }

Property Value

Type: System.Collections.Generic.IDictionary<UInt16, Double>
An IDictionary<TKey, TValue> object that contains key-value pairs that represents advance height information for the glyphs. The key is a UInt16 that identifies the glyph index. The value is a Double that represents the advance height.

The AdvanceHeights property is used for calculating vertical layout.

The following example shows how to return the collection of advance heights from the glyphs in the font.

// Create a glyph typeface by referencing the Verdana font.
GlyphTypeface glyphTypeface = new GlyphTypeface(new Uri("file:///C:\\WINDOWS\\Fonts\\verdana.ttf"));

// Retrieve the advance heights for the glyphs in the Verdana font.
IDictionary<ushort, double> dictionary = glyphTypeface.AdvanceHeights;
foreach (KeyValuePair<ushort, double> kvp in dictionary)
{
    // Retrieve the key/value pair information.
}

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft