Uredi

Deli z drugimi prek


FontStretch Struct

Definition

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
Inheritance
FontStretch
Attributes
Implements

Remarks

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.

The FontStretches values correspond to the usWidthClass definition in the OpenType specification. The usWidthClass represents an integer value between 1 and 9 - lower values indicate narrower widths; higher values indicate wider widths.

Font stretch usWidthClass % of normal
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%

For more information on the OpenType usWidthClass value, see the usWidthClass section of the OpenType specification.

XAML Attribute Usage

<object fontStretchesProperty="fontStretchesValue"/>  

XAML Values

fontStretchesValue
A FontStretches value expressed as the name string, such as "Condensed", "Normal", or "Expanded".

Methods

Compare(FontStretch, FontStretch)

Compares two instances of FontStretch objects.

Equals(FontStretch)

Compares a FontStretch object with the current FontStretch object.

Equals(Object)

Compares a Object with the current FontStretch object.

FromOpenTypeStretch(Int32)

Creates a new instance of FontStretch that corresponds to the OpenType usStretchClass value.

GetHashCode()

Retrieves the hash code for this object.

ToOpenTypeStretch()

Returns a value that represents the OpenType usStretchClass for this FontStretch object.

ToString()

Creates a String representation of the current FontStretch object based on the current culture.

Operators

Equality(FontStretch, FontStretch)

Compares two instances of FontStretch for equality.

GreaterThan(FontStretch, FontStretch)

Evaluates two instances of FontStretch to determine if one instance is greater than the other.

GreaterThanOrEqual(FontStretch, FontStretch)

Evaluates two instances of FontStretch to determine whether one instance is greater than or equal to the other.

Inequality(FontStretch, FontStretch)

Evaluates two instances of FontStretch to determine inequality.

LessThan(FontStretch, FontStretch)

Evaluates two instances of FontStretch to determine whether one instance is less than the other.

LessThanOrEqual(FontStretch, FontStretch)

Evaluates two instances of FontStretch to determine whether one instance is less than or equal to the other.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider)

For a description of this member, see ToString(String, IFormatProvider).

Applies to

See also