FontStretch 結構
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
描述與該字型的一般外觀比例相比,字型的延展程度。
public value class FontStretch : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.FontStretchConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None)]
public struct FontStretch : IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.FontStretchConverter))>]
[<System.Windows.Localizability(System.Windows.LocalizationCategory.None)>]
type FontStretch = struct
interface IFormattable
Public Structure FontStretch
Implements IFormattable
- 繼承
- 屬性
- 實作
備註
字型拉伸描述字型從其正常寬高比(即字型中原本指定的寬高比)被拉伸的程度。
這些 FontStretches 值對應 usWidthClass 於 OpenType 規範中的定義。 代表 usWidthClass 介於1到9之間的整數值——值越低表示寬度越窄;越高則表示寬度越大。
| 字體拉伸 | usWidthClass | % 正常 |
|---|---|---|
| UltraCondensed | 1 | 50.0% |
| ExtraCondensed | 2 | 62.5% |
| Condensed | 3 | 75.0% |
| SemiCondensed | 4 | 87.5% |
| Medium | 5 | 100.0% |
| SemiExpanded | 6 | 112.5% |
| Expanded | 7 | 125.0% |
| ExtraExpanded | 8 | 150.0% |
| UltraExpanded | 9 | 200.0% |
欲了解更多 OpenType usWidthClass 值的資訊,請參閱 OpenType 規範中的 usWidthClass 章節。
XAML 屬性使用方式
<object fontStretchesProperty="fontStretchesValue"/>
XAML 值
fontStretchesValue 以名稱字串表示的 FontStretches 值,例如「Condensed」、「Normal」或「Expanded」。
方法
| 名稱 | Description |
|---|---|
| Compare(FontStretch, FontStretch) |
比較兩個物件實例 FontStretch 。 |
| Equals(FontStretch) |
比較物件 FontStretch 與當前 FontStretch 物件。 |
| Equals(Object) |
將 a Object 與當前 FontStretch 物件比較。 |
| FromOpenTypeStretch(Int32) |
建立一個對應 OpenType usStretchClass 值的新實例 FontStretch 。 |
| GetHashCode() |
取得此物件的雜湊碼。 |
| ToOpenTypeStretch() |
回傳一個代表該 |
| ToString() |
根據當前文化建立 String 當前物件的表示 FontStretch 。 |
操作員
| 名稱 | Description |
|---|---|
| Equality(FontStretch, FontStretch) |
比較兩個 的 FontStretch 實例,為相等。 |
| GreaterThan(FontStretch, FontStretch) |
評估兩個實 FontStretch 例,以判斷其中一個實例是否優於另一實例。 |
| GreaterThanOrEqual(FontStretch, FontStretch) |
評估兩個 的 FontStretch 實例,以判斷其中一個實例是否大於或等於另一個。 |
| Inequality(FontStretch, FontStretch) |
評估兩個案例 FontStretch 以判定不平等。 |
| LessThan(FontStretch, FontStretch) |
評估兩個實 FontStretch 例,以判斷其中一個實例是否小於另一實例。 |
| LessThanOrEqual(FontStretch, FontStretch) |
評估兩個實 FontStretch 例,以判斷其中一個實例大小或相等於另一個實例。 |
明確介面實作
| 名稱 | Description |
|---|---|
| IFormattable.ToString(String, IFormatProvider) |
關於此成員的描述,請參見 ToString(String, IFormatProvider)。 |