SharpDX.DirectWrite.TextFormat.FontWeight

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 weight of the text.

(See also unmanaged API documentation)

Notes:

  1. Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a typeface, as compared to a “normal” character from that same typeface.
  2. Not all weights are available for all typefaces. When a weight is not available for a typeface, the closest matching weight is returned.
  3. Font weight values less than 1 or greater than 999 are considered invalid, and they are rejected by font API functions.

Property Value

A SharpDX.DirectWrite.FontWeight enum value that indicates the type of weight (such as normal, bold, or black). See table below.

Syntax

\<textlayout\>.FontWeight

Possible values are

ValueDescription
ThinPredefined font weight: Thin (100).
ExtraLightPredefined font weight: Extra-light (200).
UltraLightPredefined font weight: Ultra-light (200).
LightPredefined font weight: Light (300).
NormalPredefined font weight: Normal (400).
RegularPredefined font weight: Regular (400).
MediumPredefined font weight: Medium (500).
DemiBoldPredefined font weight: Demi-bold (600).
SemiBoldPredefined font weight: Semi-bold (600).
BoldPredefined font weight: Bold (700).
ExtraBoldPredefined font weight: Extra-bold (800).
UltraBoldPredefined font weight: Extra-bold (800).
BlackPredefined font weight: Black (900).
HeavyPredefined font weight: Heavy (900).
ExtraBlackPredefined font weight: Extra-black (950).
UltraBlackPredefined font weight: Ultra-black (950).
SemiLightPredefined font weight: Normal (400).