Прочетете на английски Редактиране

Споделяне чрез


Font.FromLogFont Method

Definition

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 (LOGFONT) structure.

FromLogFont(LOGFONT)
FromLogFont(Object)

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

FromLogFont(LOGFONT, IntPtr)

Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
C#
public static System.Drawing.Font FromLogFont(in System.Drawing.Interop.LOGFONT logFont, IntPtr hdc);

Parameters

logFont
LOGFONT
hdc
IntPtr

Returns

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
Windows Desktop 8, 9, 10

FromLogFont(Object, IntPtr)

Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs

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

C#
public static System.Drawing.Font FromLogFont(object lf, IntPtr hdc);

Parameters

lf
Object

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

hdc
IntPtr

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

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

FromLogFont(LOGFONT)

Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
C#
public static System.Drawing.Font FromLogFont(in System.Drawing.Interop.LOGFONT logFont);

Parameters

logFont
LOGFONT

Returns

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
Windows Desktop 8, 9, 10

FromLogFont(Object)

Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs

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

C#
public static System.Drawing.Font FromLogFont(object lf);

Parameters

lf
Object

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

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.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10