IDWriteGdiInterop1::CreateFontFromLOGFONT method (dwrite_3.h)

Creates a font object that matches the properties specified by the LOGFONT structure.

Syntax

HRESULT CreateFontFromLOGFONT(
  [in]           LOGFONTW const        *logFont,
  [in, optional] IDWriteFontCollection *fontCollection,
  [out]          IDWriteFont           **font
);

Parameters

[in] logFont

Type: LOGFONTW

Structure containing a GDI-compatible font description.

[in, optional] fontCollection

Type: IDWriteFontCollection*

The font collection to search. If NULL, the local system font collection is used.

[out] font

Type: IDWriteFont**

Receives a newly created font object if successful, or NULL in case of error.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Target Platform Windows
Header dwrite_3.h
Library Dwrite.lib
DLL Dwrite.dll

See also

IDWriteGdiInterop1