FontStretch Structure

 

Describes the degree to which a font has been stretched compared to the normal aspect ratio of that font.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

[TypeConverterAttribute(typeof(FontStretchConverter))]
[LocalizabilityAttribute(LocalizationCategory.None)]
public struct FontStretch : IFormattable

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCompare(FontStretch, FontStretch)

Compares two instances of FontStretch objects.

System_CAPS_pubmethodEquals(FontStretch)

Compares a FontStretch object with the current FontStretch object.

System_CAPS_pubmethodEquals(Object)

Compares a Object with the current FontStretch object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodSystem_CAPS_staticFromOpenTypeStretch(Int32)

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

System_CAPS_pubmethodGetHashCode()

Retrieves the hash code for this object.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToOpenTypeStretch()

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

System_CAPS_pubmethodToString()

Creates a String representation of the current FontStretch object based on the current culture.(Overrides ValueType.ToString().)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(FontStretch, FontStretch)

Compares two instances of FontStretch for equality.

System_CAPS_puboperatorSystem_CAPS_staticGreaterThan(FontStretch, FontStretch)

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

System_CAPS_puboperatorSystem_CAPS_staticGreaterThanOrEqual(FontStretch, FontStretch)

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

System_CAPS_puboperatorSystem_CAPS_staticInequality(FontStretch, FontStretch)

Evaluates two instances of FontStretch to determine inequality.

System_CAPS_puboperatorSystem_CAPS_staticLessThan(FontStretch, FontStretch)

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

System_CAPS_puboperatorSystem_CAPS_staticLessThanOrEqual(FontStretch, FontStretch)

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

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.

<object fontStretchesProperty="fontStretchesValue"/>

fontStretchesValue

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

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: