Skip to main content

Class Font

Namespace: VelloSharp
Assembly: VelloSharp.dll

public sealed class Font : IDisposable

Inheritance

objectFont

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Handle

public nint Handle { get; }

Property Value

nint

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~Font()

protected ~Font()

Load(ReadOnlySpan<byte>, uint)

public static Font Load(ReadOnlySpan<byte> fontData, uint index = 0)

Parameters

fontData ReadOnlySpan<byte>

index uint

Returns

Font

TryGetGlyphIndex(uint, out ushort)

public bool TryGetGlyphIndex(uint codePoint, out ushort glyphId)

Parameters

codePoint uint

glyphId ushort

Returns

bool

TryGetGlyphMetrics(ushort, float, out GlyphMetrics)

public bool TryGetGlyphMetrics(ushort glyphId, float fontSize, out GlyphMetrics metrics)

Parameters

glyphId ushort

fontSize float

metrics GlyphMetrics

Returns

bool