FontStretch FontStretch FontStretch FontStretch Struct

定義

描述字型相對於字型一般外觀比例的縮放度數。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
type FontStretch = struct
    interface IFormattable
Public Structure FontStretch
Implements IFormattable
繼承
FontStretchFontStretchFontStretchFontStretch
屬性
實作

備註

字型延展會描述字型表單從其一般外觀比例伸展的程度, 這是為字型中的字元指定的高度比例的原始寬度。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.

值會對應至OpenTypeOpenType規格usWidthClass中的定義。 FontStretchesThe 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
以名稱字串表示的值,例如"緊縮"、"Normal"或"加寬"。FontStretchesA FontStretches value expressed as the name string, such as "Condensed", "Normal", or "Expanded".

方法

Compare(FontStretch, FontStretch) Compare(FontStretch, FontStretch) Compare(FontStretch, FontStretch) Compare(FontStretch, FontStretch)

比較 FontStretch 物件的兩個執行個體。Compares two instances of FontStretch objects.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Object 與目前的 FontStretch 物件相比較。Compares a Object with the current FontStretch object.

Equals(FontStretch) Equals(FontStretch) Equals(FontStretch) Equals(FontStretch)

FontStretch 物件與目前的 FontStretch 物件相比較。Compares a FontStretch object with the current FontStretch object.

FromOpenTypeStretch(Int32) FromOpenTypeStretch(Int32) FromOpenTypeStretch(Int32) FromOpenTypeStretch(Int32)

建立對應於 OpenTypeOpenType usStretchClass 值的新 FontStretch 執行個體。Creates a new instance of FontStretch that corresponds to the OpenTypeOpenType usStretchClass value.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

擷取這個物件的雜湊碼。Retrieves the hash code for this object.

ToOpenTypeStretch() ToOpenTypeStretch() ToOpenTypeStretch() ToOpenTypeStretch()

傳回值,這個值表示這個 FontStretch 物件的 OpenTypeOpenType usStretchClassReturns a value that represents the OpenTypeOpenType usStretchClass for this FontStretch object.

ToString() ToString() ToString() ToString()

根據目前的文化特性 (Culture),建立目前 String 物件的 FontStretch 表示。Creates a String representation of the current FontStretch object based on the current culture.

運算子

Equality(FontStretch, FontStretch) Equality(FontStretch, FontStretch) Equality(FontStretch, FontStretch) Equality(FontStretch, FontStretch)

比較 FontStretch 的兩個執行個體是否相等。Compares two instances of FontStretch for equality.

GreaterThan(FontStretch, FontStretch) GreaterThan(FontStretch, FontStretch) GreaterThan(FontStretch, FontStretch) GreaterThan(FontStretch, FontStretch)

評估 FontStretch 的兩個執行個體,判斷其中一個執行個體是否大於另一個。Evaluates two instances of FontStretch to determine if one instance is greater than the other.

GreaterThanOrEqual(FontStretch, FontStretch) GreaterThanOrEqual(FontStretch, FontStretch) GreaterThanOrEqual(FontStretch, FontStretch) 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) Inequality(FontStretch, FontStretch) Inequality(FontStretch, FontStretch) Inequality(FontStretch, FontStretch)

評估 FontStretch 的兩個執行個體,判斷兩者是否不相等。Evaluates two instances of FontStretch to determine inequality.

LessThan(FontStretch, FontStretch) LessThan(FontStretch, FontStretch) LessThan(FontStretch, FontStretch) LessThan(FontStretch, FontStretch)

評估 FontStretch 的兩個執行個體,判斷其中一個執行個體是否小於另一個。Evaluates two instances of FontStretch to determine whether one instance is less than the other.

LessThanOrEqual(FontStretch, FontStretch) LessThanOrEqual(FontStretch, FontStretch) LessThanOrEqual(FontStretch, FontStretch) 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) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)

如需這個成員的說明,請參閱 ToString(String, IFormatProvider)For a description of this member, see ToString(String, IFormatProvider).

適用於

另請參閱