GlyphTypeface.AdvanceHeights 属性

定义

获取由 GlyphTypeface 对象表示的标志符号的步进高度。

public:
 property System::Collections::Generic::IDictionary<System::UInt16, double> ^ AdvanceHeights { System::Collections::Generic::IDictionary<System::UInt16, double> ^ get(); };
public System.Collections.Generic.IDictionary<ushort,double> AdvanceHeights { get; }
member this.AdvanceHeights : System.Collections.Generic.IDictionary<uint16, double>
Public ReadOnly Property AdvanceHeights As IDictionary(Of UShort, Double)

属性值

一个 IDictionary<TKey,TValue> 对象,包含表示标志符号的步进高度信息的键值对。 该键是一个标识标志符号索引的 UInt16。 该值是一个表示步进高度的 Double

示例

以下示例演示如何从 字体中的字形返回高级高度的集合。

// 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.
}
' Create a glyph typeface by referencing the Verdana font.
Dim glyphTypeface As New GlyphTypeface(New Uri("file:///C:\WINDOWS\Fonts\verdana.ttf"))

' Retrieve the advance heights for the glyphs in the Verdana font.
Dim dictionary As IDictionary(Of UShort, Double) = glyphTypeface.AdvanceHeights
For Each kvp As KeyValuePair(Of UShort, Double) In dictionary
    ' Retrieve the key/value pair information.
Next kvp

注解

属性 AdvanceHeights 用于计算垂直布局。

适用于

另请参阅