Skip to content

FontConfig Class

The config settings for loading the default fonts when the game starts.

C#
public class FontConfig : IConfigurator

Inheritance object

Implements IConfigurator

C#
public FontConfig()

An array of custom font files to load into SadConsole. The default is an empty array.

C#
public string[] CustomFonts

The default font to use when the game starts. A null value indicates that the default font is the built-in font.

C#
public string? AlternativeDefaultFont

When true, the default font is the SadConsole extended font. The default is false.

C#
public bool UseExtendedFont

The size of font to use with the default font. The default is One.

C#
public IFont.Sizes DefaultFontSize

The method invoked by the GameHost as fonts are loaded.

C#
public Action<FontConfig, GameHost>? FontLoader { get; set; }

Sets the default font to the SadConsole standard font, an IBM 8x16 font.

C#
public void UseBuiltinFont()

Sets the default font to the SadConsole extended font, an IBM 8x16 font with SadConsole specific characters past index 255.

C#
public void UseBuiltinFontExtended()

Sets the default font in SadConsole to the specified font file.

C#
public void UseCustomFont(string fontFile)

fontFile string

Loads the provided font files into SadConsole.

C#
public void AddExtraFonts(params string[] fontFiles)

fontFiles string[]
An array of font files to load.

Sets the default font size for the game. The default is One.

C#
public void SetDefaultFontSize(IFont.Sizes size)

size IFont.Sizes
The default font size.

Invokes the FontLoader delegate.

C#
public void Run(BuilderBase config, GameHost game)

config BuilderBase
The builder running this configurator.

game GameHost
The game being created.