FontStretch Struct
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- Attributes
- Implements
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.
<object fontStretchesProperty="fontStretchesValue"/>
fontStretchesValue
A FontStretches value expressed as the name string, such as "Condensed", "Normal", or "Expanded".
Compare(Font |
Compares two instances of FontStretch objects. |
Equals(Font |
Compares a FontStretch object with the current FontStretch object. |
Equals(Object) |
Compares a Object with the current FontStretch object. |
From |
Creates a new instance of FontStretch that corresponds to the OpenType usStretchClass value. |
Get |
Retrieves the hash code for this object. |
To |
Returns a value that represents the OpenType |
To |
Creates a String representation of the current FontStretch object based on the current culture. |
Equality(Font |
Compares two instances of FontStretch for equality. |
Greater |
Evaluates two instances of FontStretch to determine if one instance is greater than the other. |
Greater |
Evaluates two instances of FontStretch to determine whether one instance is greater than or equal to the other. |
Inequality(Font |
Evaluates two instances of FontStretch to determine inequality. |
Less |
Evaluates two instances of FontStretch to determine whether one instance is less than the other. |
Less |
Evaluates two instances of FontStretch to determine whether one instance is less than or equal to the other. |
IFormattable. |
For a description of this member, see ToString(String, IFormatProvider). |
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: