FontCreateΒΆ

FontCreate creates a font object.

hFont = FontCreate()
hFont = FontCreate(hFontold)
hFont = FontCreate(rsHeight, nWeight, rsPitchAndFamily, ssFaceName, bUnderline, bItalic, bStrikeOut, rsAngle, rvColorRGB)

Return Value

hFont is the handle of the created font object.

Parameters

rsHeight

rsHeight specifies the height of the font in points (pt). 28.453 are 1 cm.

nWeight

nWeight specifies the weight of the font, in the range 0 through 1000 (for example, 400 is normal and 700 is bold).

Value Meaning
FW_DONTCARE (0) Lets Windows choose settings
FW_THIN (100) Extra Thin
FW_EXTRALIGHT (200) Very Thin
FW_LIGHT (300) Thin
FW_NORMAL (400) Normal
FW_MEDIUM (500) Medium
FW_SEMIBOLD (600) Half Bold
FW_BOLD (700) Bold
FW_EXTRABOLD (800) Very Bold
FW_HEAVY (900) Extra Bold
rsPitchAndFamily

rsPitchAndFamily specifies the pitch and family of the font. It can be one of the following values:

Value Meaning
DEFAULT_PITCH Character width not set
FIXED_PITCH Font with constant width
VARIABLE_PITCH Font with variable width
ssFaceName

ssFaceName specifies the type face name of the font.

bUnderline

bUnderline specifies an underlined font if set to TRUE.

bItalic

bItalic specifies an italic font if set to TRUE.

bStrikeOut

bStrikeOut specifies a strikeout font if set to TRUE.

rsAngle

rsAngle specifies the angle, in degrees, of the font (relative to the bottom of the page).

rvColorRGB

rvColorRGB specifies the color of the font. rvColorRGB is a vector with three elements:

Value Meaning
rvColorRGB[1] Red (0 to 255)
rvColorRGB[2] Green (0 to 255)
rvColorRGB[3] Blue (0 to 255)

id-1015183