Table of Contents

Struct GdiLogFont

Namespace
PaintDotNet.Gdi
Assembly
PaintDotNet.Windows.dll

A logical font description.

public struct GdiLogFont
Inherited Members

Remarks

        This is a projection of Win32's <a href="https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfontw">LOGFONTW</a>
        struct. It has the same size and layout, and the two are "reinterpret-cast" compatible (such as with
        <code>(LOGFONTW*)&gdiLogFont</code> or <code>(GdiLogFont*)&logFontW</code>, or with <xref href="System.Runtime.CompilerServices.Unsafe.BitCast%60%602(%60%600)" data-throw-if-not-resolved="false"></xref>).

        This struct is also compatible with <xref href="System.Drawing.Interop.LOGFONT" data-throw-if-not-resolved="false"></xref>.

Fields

MaxFaceNameLength

The number of characters you need for the face name string, without the null terminator.

MaxFaceNameWithNullLength

The number of characters you need for the face name string, with the null terminator.

Properties

CharacterSet
Escapement
Family
Height
Italic
OutputPrecision
Pitch
Quality
StrikeOut
Underline
Weight
Width

Methods

GetFaceName()

Gets the face name of the logical font.

GetFaceName(Span<char>)

Copies the logical font's face name to the provided buffer.

GetFaceNameSpan()
GetFaceNameWithNullSpan()
SetFaceName(ReadOnlySpan<char>, bool)
SetFaceName(string, bool)

Operators

implicit operator LOGFONT(in GdiLogFont)
implicit operator GdiLogFont(in LOGFONT)