Table of Contents

Struct LoadTrueTypeFontFromStream

Namespace
BSGameLib.Game.Fonts
Assembly
BSGameLib.Game.dll

Loads a TrueType or OpenType font from a stream. The font is read from the stream when it is created, and does not keep the stream.

public readonly record struct LoadTrueTypeFontFromStream : IFontParameters, IEquatable<LoadTrueTypeFontFromStream>
Implements
Inherited Members

Constructors

LoadTrueTypeFontFromStream(string, Stream, int, bool, bool)

Loads a TrueType or OpenType font from a stream. The font is read from the stream when it is created, and does not keep the stream.

public LoadTrueTypeFontFromStream(string FileName, Stream Stream, int Size, bool Bold = false, bool Italic = false)

Parameters

FileName string

The name the font is known by, kept as its FileName. It need not be a path.

Stream Stream

The stream the font file is read from.

Size int

The size the glyphs are rendered at.

Bold bool

Whether the font is bold. The glyphs are emboldened from the one face.

Italic bool

Whether the font is italic. The glyphs are slanted from the one face.

Properties

Bold

Whether the font is bold. The glyphs are emboldened from the one face.

public bool Bold { get; init; }

Property Value

bool

FileName

The name the font is known by, kept as its FileName. It need not be a path.

public string FileName { get; init; }

Property Value

string

Italic

Whether the font is italic. The glyphs are slanted from the one face.

public bool Italic { get; init; }

Property Value

bool

Size

The size the glyphs are rendered at.

public int Size { get; init; }

Property Value

int

Stream

The stream the font file is read from.

public Stream Stream { get; init; }

Property Value

Stream