D3DXFONT_DESC structure

Defines the attributes of a font.

Syntax

typedef struct D3DXFONT_DESC {
  INT   Height;
  UINT  Width;
  UINT  Weight;
  UINT  MipLevels;
  BOOL  Italic;
  BYTE  CharSet;
  BYTE  OutputPrecision;
  BYTE  Quality;
  BYTE  PitchAndFamily;
  TCHAR FaceName;
} D3DXFONT_DESC, *LPD3DXFONT_DESC;

Members

Height

Type: INT

Height, in logical units, of the font's character cell or character.

Width

Type: UINT

Width, in logical units, of characters in the font.

Weight

Type: UINT

Weight of the font in the range from 0 through 1000.

MipLevels

Type: UINT

Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created. If the value is 1, the texture space is mapped identically to the screen space.

Italic

Type: BOOL

Set to TRUE for an Italic font.

CharSet

Type: BYTE

Character set.

OutputPrecision

Type: BYTE

Output precision. The output precision defines how closely the output must match the requested font height, width, character orientation, escapement, pitch, and font type.

Quality

Type: BYTE

Output quality.

PitchAndFamily

Type: BYTE

Pitch and family of the font.

FaceName

Type: TCHAR

A null-terminated string or characters that specifies the typeface name of the font. The length of the string must not exceed 32 characters, including the terminating null character. If FaceName is an empty string, the first font that matches the other specified attributes will be used. If the compiler settings require Unicode, the data type TCHAR resolves to WCHAR; otherwise, the data type resolves to CHAR. See Remarks.

Remarks

The compiler setting also determines the structure type. If Unicode is defined, the D3DXFONT_DESC structure type resolves to a D3DXFONT_DESCW; otherwise the structure type resolves to a D3DXFONT_DESCA.

Possible values of the above members are given in the GDI LOGFONT structure.

Requirements

Requirement Value
Header
D3dx9core.h

See also

D3DX Structures

GetDesc