FontStretch FontStretch FontStretch 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
type FontStretch = struct
    interface IFormattable
Public Structure FontStretch
Implements IFormattable
Inheritance
FontStretchFontStretchFontStretchFontStretch
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 "Font File Tables" 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) Compare(FontStretch, FontStretch) Compare(FontStretch, FontStretch) Compare(FontStretch, FontStretch)

Compares two instances of FontStretch objects.

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

Compares a Object with the current FontStretch object.

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

Compares a FontStretch object with the current FontStretch object.

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

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

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

Retrieves the hash code for this object.

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

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

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

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

Operators

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

Compares two instances of FontStretch for equality.

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

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)

Evaluates two instances of FontStretch to determine inequality.

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

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

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

Applies to

See Also