Struct LoadTrueTypeFontFromStream
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
FileNamestringThe name the font is known by, kept as its FileName. It need not be a path.
StreamStreamThe stream the font file is read from.
SizeintThe size the glyphs are rendered at.
BoldboolWhether the font is bold. The glyphs are emboldened from the one face.
ItalicboolWhether 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
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
Italic
Whether the font is italic. The glyphs are slanted from the one face.
public bool Italic { get; init; }
Property Value
Size
The size the glyphs are rendered at.
public int Size { get; init; }
Property Value
Stream
The stream the font file is read from.
public Stream Stream { get; init; }