Table of Contents

Method GetFaceName

Namespace
PaintDotNet.Gdi
Assembly
PaintDotNet.Windows.dll

GetFaceName()

Gets the face name of the logical font.

public readonly string GetFaceName()

Returns

string

A new string with a copy of the face name.

Remarks

This method allocates and returns a new string every time it is called. It is recommended that you cache the string instead of calling this method repeatedly.

GetFaceName(Span<char>)

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

public readonly Span<char> GetFaceName(Span<char> buffer)

Parameters

buffer Span<char>

The span to copy the face name string into. The entire span is cleared with Clear() before the string is copied into it.

Returns

Span<char>

The buffer sliced to the length needed to hold the face name. The null terminator is not included in the sliced length, but does exist in the un-sliced buffer as long as its length is at least 1 + MaxFaceNameLength.

Exceptions

InsufficientBufferException

If buffer's Length is less than MaxFaceNameLength.