Skip to content

IFontLoader.LoadFontAsync(string, int, CancellationToken) Method

Definition

Namespace: Brine2D.Rendering

Loads a font from file asynchronously.

System.Threading.Tasks.Task<Brine2D.Rendering.IFont> LoadFontAsync(string path, int size, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

path System.String

Path to the font file (.ttf, .otf).

size System.Int32

Font size in points.

cancellationToken System.Threading.CancellationToken

Cancellation token.

Returns

System.Threading.Tasks.Task<IFont>
Loaded font.