Method GetFaceName
- Namespace
- PaintDotNet.Gdi
- Assembly
- PaintDotNet.Windows.dll
GetFaceName()
Gets the face name of the logical font.
public readonly string GetFaceName()
Returns
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
bufferSpan<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
buffersliced 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-slicedbufferas long as its length is at least1 + MaxFaceNameLength.
Exceptions
- InsufficientBufferException
If
buffer's Length is less than MaxFaceNameLength.