Font.FromLogFont Method

Definition

Creates a Font from the specified GDI logical font (LOGFONT) structure.

Overloads

FromLogFont(Object, IntPtr)

Creates a Font from the specified GDI logical font (LOGFONT) structure.

FromLogFont(Object)

Creates a Font from the specified GDI logical font (LOGFONT) structure.

FromLogFont(Object, IntPtr)

Creates a Font from the specified GDI logical font (LOGFONT) structure.

public:
 static System::Drawing::Font ^ FromLogFont(System::Object ^ lf, IntPtr hdc);
public static System.Drawing.Font FromLogFont (object lf, IntPtr hdc);
static member FromLogFont : obj * nativeint -> System.Drawing.Font
Public Shared Function FromLogFont (lf As Object, hdc As IntPtr) As Font

Parameters

lf
Object

An Object that represents the GDI LOGFONT structure from which to create the Font.

hdc
IntPtr

nativeint

A handle to a device context that contains additional information about the lf structure.

Returns

Font

The Font that this method creates.

Exceptions

The font is not a TrueType font.

Remarks

A GDI LOGFONT, or logical font, is a structure that contains 14 properties that describe a particular font.

Applies to

FromLogFont(Object)

Creates a Font from the specified GDI logical font (LOGFONT) structure.

public:
 static System::Drawing::Font ^ FromLogFont(System::Object ^ lf);
public static System.Drawing.Font FromLogFont (object lf);
static member FromLogFont : obj -> System.Drawing.Font
Public Shared Function FromLogFont (lf As Object) As Font

Parameters

lf
Object

An Object that represents the GDI LOGFONT structure from which to create the Font.

Returns

Font

The Font that this method creates.

Remarks

A GDI LOGFONT, or logical font, is a structure that contains 14 properties that describe a particular font.

Applies to