Typeface.Stretch 属性

定义

获取 Typeface 的拉伸值。 拉伸值确定在显示字样时是扩展字样还是压缩字样。

public:
 property System::Windows::FontStretch Stretch { System::Windows::FontStretch get(); };
public System.Windows.FontStretch Stretch { get; }
member this.Stretch : System.Windows.FontStretch
Public ReadOnly Property Stretch As FontStretch

属性值

一个表示字样拉伸值的 FontStretch 值。

示例

// Get the font stretch value for the typeface.
FontStretch fontStretch = typeface.Stretch;

if (fontStretch == FontStretches.Condensed)
{
    // Perform action based on condensed stretch value.
}
' Get the font stretch value for the typeface.
Dim fontStretch As FontStretch = typeface.Stretch

If fontStretch = FontStretches.Condensed Then
    ' Perform action based on condensed stretch value.
End If

注解

字体拉伸值描述字体窗体从其正常纵横比拉伸到的程度,这是为字体中的字形指定的原始宽度与高度比率。

适用于