Condividi tramite


Font.Font(const WCHAR*, REAL, INT, Unit, const FontCollection*) constructor

Applies to: desktop apps only

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

Syntax

Font(
  [in]  const WCHAR *familyName,
  [in]  REAL emSize,
  [in]  INT style,
  [in]  Unit unit,
  [in]  const FontCollection *fontCollection
);

Parameters

  • familyName [in]
    Type: const WCHAR*

    Name of the font family.

  • emSize [in]
    Type: REAL

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

  • style [in]
    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.

  • unit [in]
    Type: Unit

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

  • fontCollection [in]
    Type: const FontCollection*

    Optional. Pointer to a FontCollection object that specifies a user-defined group of fonts. If the value of this parameter is NULL, the system font collection is used. The default value is NULL.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusheaders.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Font

FontFamily

FontStyle

Unit

Using Text and Fonts

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012