FontSet()

Specifies a font and font attributes. To see the height a weight values of a specified font, record your actions as you specify a font and font attributes.

Token ID

AFTKN_SET_FONT or 583

Syntax

VOID FontSet(ANSISTRING FaceName; 
              [DWORD Height]; 
              [DWORD Weight]; 
              [ENUM Underline]; 
              [ENUM Italic]; 
              [WORD CharSet];
              [ENUM Strikeout];
              [DWORD Color])

Parameters

FaceName As ANSISTRING

Name of font.

Height As DWORD

(Optional) Font height in logical height units. You can convert from pixels to logical height units using the following formula: lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);. Examples: Cell height: 0-32767. Character height including ascender and descender: 32768-65535.

Weight As DWORD

(Optional) Font weight. Some fonts have only three weights: Normal, Regular, and Bold.

100

THIN

200

EXTRATHIN

300

ULTRALIGHT

400

NORMAL

400

REGULAR

500

MEDIUM

600

SEMIBOLD

600

DEMIBOLD

700

BOLD

800

EXTRABOLD

800

ULTRABOLD

900

BLACK

900

HEAVY

Underline As ENUM

(Optional) Enumerated values:

  • 0 No
  • 1 Yes
Italic As ENUM

(Optional) Enumerated values:

  • 0 No
  • 1 Yes
CharSet As WORD

(Optional) Asian versions only.

Strikeout As ENUM

(Optional) Enumerated values:

  • 0 No
  • 1 Yes
Color As DWORD

(Optional) Use RGB values.