SharpDX.DirectWrite.TextFormat.FontStretch

View as Markdown

Disclaimer: The SharpDX SDK Reference section was compiled from the official SharpDX Documentation and was NOT authored by NinjaTrader. The contents of this section are provided as-is and only cover a fraction of what is available from the SharpDX SDK. This page was intended only as a reference guide to help you get started with some of the 2D Graphics concepts used in the NinjaTrader.Custom assembly. Please refer to the official SharpDX Documentation for additional members not covered in this reference. For more seasoned graphic developers, the original MSDN Direct2D1 and DirectWrite unmanaged API documentation can also be helpful for understanding the DirectX/Direct2D run-time environment. For NinjaScript development purposes, we document only essential members in the structure of this page.

Definition

Gets the font stretch of the text.

(See also unmanaged API documentation)

  1. 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.
  2. Values other than the ones defined in the enumeration are considered to be invalid, and are rejected by font API functions.

Property Value

A SharpDX.DirectWrite.FontStretch enum value which indicates the type of font stretch (such as normal or condensed). See table below.

Syntax

\<textlayout\>.FontStretch

Possible values are:

ValueDescription
UndefinedPredefined font stretch: Not known (0).
UltraCondensedPredefined font stretch: Ultra-condensed (1).
ExtraCondensedPredefined font stretch: Extra-condensed (2).
CondensedPredefined font stretch: Condensed (3).
SemiCondensedPredefined font stretch: Semi-condensed (4).
NormalPredefined font stretch: Normal (5).
MediumPredefined font stretch: Medium (5).
SemiExpandedPredefined font stretch: Semi-expanded (6).
ExpandedPredefined font stretch: Expanded (7).
ExtraExpandedPredefined font stretch: Extra-expanded (8).
UltraExpandedPredefined font stretch: Ultra-expanded (9).