FontStretch 結構
定義
描述字型相對於字型一般外觀比例的縮放度數。Describes the degree to which a font has been stretched compared to the normal aspect ratio of that font.
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
- 繼承
- 屬性
- 實作
備註
字型伸展描述字型表單從一般外觀比例伸展的程度,也就是字型中為圖像指定的原始寬度和高度比例。A font stretch describes the degree to which a font form is stretched from its normal aspect ratio, which is the original width to height ratio specified for the glyphs in the font.
FontStretches值會對應至 usWidthClass
規格中的定義 OpenTypeOpenType 。The FontStretches values correspond to the usWidthClass
definition in the OpenTypeOpenType specification. usWidthClass
代表1到9之間的整數值,表示較窄的寬度; 較高的值表示寬度較寬。The usWidthClass
represents an integer value between 1 and 9 - lower values indicate narrower widths; higher values indicate wider widths.
字型延展Font stretch | usWidthClassusWidthClass | 一般的%% of normal |
---|---|---|
UltraCondensed | 11 | 50.0%50.0% |
ExtraCondensed | 22 | 62.5%62.5% |
Condensed | 33 | 75.0%75.0% |
SemiCondensed | 44 | 87.5%87.5% |
Medium | 55 | 100.0%100.0% |
SemiExpanded | 66 | 112.5%112.5% |
Expanded | 77 | 125.0%125.0% |
ExtraExpanded | 88 | 150.0%150.0% |
UltraExpanded | 99 | 200.0%200.0% |
如需 OpenType 值的詳細資訊 usWidthClass
,請參閱 opentype 規格的 usWidthClass 一節。For more information on the OpenType usWidthClass
value, see the usWidthClass section of the OpenType specification.
XAML Attribute UsageXAML Attribute Usage
<object fontStretchesProperty="fontStretchesValue"/>
XAML 值XAML Values
fontStretchesValuefontStretchesValue
以 FontStretches 名稱字串表示的值,例如「壓縮」、「標準」或「已展開」。A FontStretches value expressed as the name string, such as "Condensed", "Normal", or "Expanded".
方法
Compare(FontStretch, FontStretch) |
比較 FontStretch 物件的兩個執行個體。Compares two instances of FontStretch objects. |
Equals(FontStretch) |
將 FontStretch 物件與目前的 FontStretch 物件相比較。Compares a FontStretch object with the current FontStretch object. |
Equals(Object) |
將 Object 與目前的 FontStretch 物件相比較。Compares a Object with the current FontStretch object. |
FromOpenTypeStretch(Int32) |
建立對應於 OpenTypeOpenType usStretchClass 值的新 FontStretch 執行個體。Creates a new instance of FontStretch that corresponds to the OpenTypeOpenType usStretchClass value. |
GetHashCode() |
擷取這個物件的雜湊碼。Retrieves the hash code for this object. |
ToOpenTypeStretch() |
傳回值,這個值表示這個 FontStretch 物件的 OpenTypeOpenType |
ToString() |
根據目前的文化特性 (Culture),建立目前 String 物件的 FontStretch 表示。Creates a String representation of the current FontStretch object based on the current culture. |
運算子
Equality(FontStretch, FontStretch) |
比較 FontStretch 的兩個執行個體是否相等。Compares two instances of FontStretch for equality. |
GreaterThan(FontStretch, FontStretch) |
評估 FontStretch 的兩個執行個體,判斷其中一個執行個體是否大於另一個。Evaluates two instances of FontStretch to determine if one instance is greater than the other. |
GreaterThanOrEqual(FontStretch, FontStretch) |
評估 FontStretch 的兩個執行個體,判斷其中一個執行個體是否大於或等於另一個。Evaluates two instances of FontStretch to determine whether one instance is greater than or equal to the other. |
Inequality(FontStretch, FontStretch) |
評估 FontStretch 的兩個執行個體,判斷兩者是否不相等。Evaluates two instances of FontStretch to determine inequality. |
LessThan(FontStretch, FontStretch) |
評估 FontStretch 的兩個執行個體,判斷其中一個執行個體是否小於另一個。Evaluates two instances of FontStretch to determine whether one instance is less than the other. |
LessThanOrEqual(FontStretch, FontStretch) |
評估 FontStretch 的兩個執行個體,判斷其中一個執行個體是否小於或等於另一個。Evaluates two instances of FontStretch to determine whether one instance is less than or equal to the other. |
明確介面實作
IFormattable.ToString(String, IFormatProvider) |
如需這個成員的說明,請參閱 ToString(String, IFormatProvider)。For a description of this member, see ToString(String, IFormatProvider). |