Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DWRITE_FONT_STRETCH enumeration

Represents the degree to which a font has been stretched compared to a font's normal aspect ratio. The enumerated 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.

Syntax


enum DWRITE_FONT_STRETCH {  DWRITE_FONT_STRETCH_UNDEFINED        = 0, 
  DWRITE_FONT_STRETCH_ULTRA_CONDENSED  = 1, 
  DWRITE_FONT_STRETCH_EXTRA_CONDENSED  = 2, 
  DWRITE_FONT_STRETCH_CONDENSED        = 3, 
  DWRITE_FONT_STRETCH_SEMI_CONDENSED   = 4, 
  DWRITE_FONT_STRETCH_NORMAL           = 5, 
  DWRITE_FONT_STRETCH_MEDIUM           = 5, 
  DWRITE_FONT_STRETCH_SEMI_EXPANDED    = 6, 
  DWRITE_FONT_STRETCH_EXPANDED         = 7, 
  DWRITE_FONT_STRETCH_EXTRA_EXPANDED   = 8, 
  DWRITE_FONT_STRETCH_ULTRA_EXPANDED   = 9 

};

Constants

DWRITE_FONT_STRETCH_UNDEFINED

Predefined font stretch : Not known (0).

DWRITE_FONT_STRETCH_ULTRA_CONDENSED

Predefined font stretch : Ultra-condensed (1).

DWRITE_FONT_STRETCH_EXTRA_CONDENSED

Predefined font stretch : Extra-condensed (2).

DWRITE_FONT_STRETCH_CONDENSED

Predefined font stretch : Condensed (3).

DWRITE_FONT_STRETCH_SEMI_CONDENSED

Predefined font stretch : Semi-condensed (4).

DWRITE_FONT_STRETCH_NORMAL

Predefined font stretch : Normal (5).

DWRITE_FONT_STRETCH_MEDIUM

Predefined font stretch : Medium (5).

DWRITE_FONT_STRETCH_SEMI_EXPANDED

Predefined font stretch : Semi-expanded (6).

DWRITE_FONT_STRETCH_EXPANDED

Predefined font stretch : Expanded (7).

DWRITE_FONT_STRETCH_EXTRA_EXPANDED

Predefined font stretch : Extra-expanded (8).

DWRITE_FONT_STRETCH_ULTRA_EXPANDED

Predefined font stretch : Ultra-expanded (9).

Remarks

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 following illustration shows an example of Normal and Condensed stretches for the Rockwell Bold typeface.

Illustration of “D2D” text in Normal and Condensed font stretch

Note  Values other than the ones defined in the enumeration are considered to be invalid, and are rejected by font API functions.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

Dwrite.h

 

 

Community Additions

Show:
© 2014 Microsoft