Font.FromLogFont Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a Font from the specified GDI logical font (LOGFONT
) structure.
Overloads
FromLogFont(LOGFONT, IntPtr) | |
FromLogFont(Object, IntPtr) |
Creates a Font from the specified GDI logical font ( |
FromLogFont(LOGFONT) | |
FromLogFont(Object) |
Creates a Font from the specified GDI logical font ( |
FromLogFont(LOGFONT, IntPtr)
- Source:
- Font.cs
public:
static System::Drawing::Font ^ FromLogFont(System::Drawing::Interop::LOGFONT % logFont, IntPtr hdc);
public static System.Drawing.Font FromLogFont (in System.Drawing.Interop.LOGFONT logFont, IntPtr hdc);
static member FromLogFont : LOGFONT * nativeint -> System.Drawing.Font
Public Shared Function FromLogFont (ByRef logFont As LOGFONT, hdc As IntPtr) As Font
Parameters
- logFont
- LOGFONT
- hdc
-
IntPtr
nativeint
Returns
Applies to
FromLogFont(Object, IntPtr)
- Source:
- Font.cs
- Source:
- Font.cs
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
- hdc
-
IntPtr
nativeint
A handle to a device context that contains additional information about the lf
structure.
Returns
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(LOGFONT)
- Source:
- Font.cs
public:
static System::Drawing::Font ^ FromLogFont(System::Drawing::Interop::LOGFONT % logFont);
public static System.Drawing.Font FromLogFont (in System.Drawing.Interop.LOGFONT logFont);
static member FromLogFont : LOGFONT -> System.Drawing.Font
Public Shared Function FromLogFont (ByRef logFont As LOGFONT) As Font
Parameters
- logFont
- LOGFONT
Returns
Applies to
FromLogFont(Object)
- Source:
- Font.cs
- Source:
- Font.cs
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
Returns
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.