EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

FontStretch Structure

July 28, 2014

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

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public struct FontStretch
<object property="fontStretchesPropertyName"/>

XAML Values

fontStretchesPropertyName

A FontStretches static property name, such as Condensed, Normal, or Expanded.

The FontStretch type exposes the following members.

  NameDescription
Public methodEqualsCompares an object with the current FontStretch object. (Overrides ValueType.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeRetrieves the hash code for this object. (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringCreates a String representation of the current FontStretch object. (Overrides ValueType.ToString().)
Top

  NameDescription
Public operatorStatic memberEqualityCompares two instances of FontStretch for equality.
Public operatorStatic memberInequalityEvaluates two instances of FontStretch to determine inequality.
Top

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.

You must use static properties of FontStretches to specify a FontStretch value. In XAML, you specify the name of a FontStretches property as the attribute value. This functionality is enabled by native XAML parsing behavior that processes the string value.

FontStretches Static Property Names

Font stretch

usWidthClass

% of normal

UltraCondensed

1

50.0%

ExtraCondensed

2

62.5%

Condensed

3

75.0%

SemiCondensed

4

87.5%

Normal

5

100%

SemiExpanded

6

112.5%

Expanded

7

125.0%

ExtraExpanded

8

150.0%

UltraExpanded

9

200.0%

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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

Anzeigen:
© 2014 Microsoft