Font::Font(constFontFamily*,REAL,INT,Unit) method (gdiplusheaders.h)

Creates a Font::Font object based on a FontFamily object, a size, a font style, and a unit of measurement.

Syntax

void Font(
  [in] const FontFamily *family,
  [in] REAL             emSize,
  [in] INT              style,
  [in] Unit             unit
);

Parameters

[in] family

Type: const FontFamily*

Pointer to a FontFamily object that specifies information such as the string that identifies the font family and the font family's text metrics measured in design units.

[in] emSize

Type: REAL

Real number that specifies the em size of the font measured in the units specified in the unit parameter.

[in] style

Type: INT

Optional. Integer that specifies the style of the typeface. This value must be an element of the FontStyle enumeration or the result of a bitwise OR applied to two or more of these elements. For example, FontStyleBold | FontStyleUnderline | FontStyleStrikeout sets the style as a combination of the three styles. The default value is FontStyleRegular.

[in] unit

Type: Unit

Optional. Element of the Unit enumeration that specifies the unit of measurement for the font size. The default value is UnitPoint.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusheaders.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Font

FontFamily

FontStyle

Unit

Using Text and Fonts