Class FontConfig
The config settings for loading the default fonts when the game starts.
Implements
Inherited Members
Namespace: SadConsole.Configuration
Assembly: SadConsole.dll
Syntax
public class FontConfig : IConfigurator
Constructors
FontConfig()
Declaration
public FontConfig()
Fields
AlternativeDefaultFont
Declaration
public string? AlternativeDefaultFont
Field Value
Type | Description |
---|---|
string |
CustomFonts
Declaration
public string[] CustomFonts
Field Value
Type | Description |
---|---|
string[] |
UseExtendedFont
Declaration
public bool UseExtendedFont
Field Value
Type | Description |
---|---|
bool |
Properties
FontLoader
Declaration
public Action<FontConfig, GameHost>? FontLoader { get; set; }
Property Value
Type | Description |
---|---|
Action<FontConfig, GameHost> |
Methods
AddExtraFonts(params string[])
Loads the provided font files into SadConsole.
Declaration
public void AddExtraFonts(params string[] fontFiles)
Parameters
Type | Name | Description |
---|---|---|
string[] | fontFiles | An array of font files to load. |
Run(Builder, GameHost)
Invokes the FontLoader delegate.
Declaration
public void Run(Builder config, GameHost game)
Parameters
Type | Name | Description |
---|---|---|
Builder | config | The builder running this configurator. |
GameHost | game | The game being created. |
UseBuiltinFont()
Sets the default font to the SadConsole standard font, an IBM 8x16 font.
Declaration
public void UseBuiltinFont()
UseBuiltinFontExtended()
Sets the default font to the SadConsole extended font, an IBM 8x16 font with SadConsole specific characters past index 255.
Declaration
public void UseBuiltinFontExtended()
UseCustomFont(string)
Sets the default font in SadConsole to the specified font file.
Declaration
public void UseCustomFont(string fontFile)
Parameters
Type | Name | Description |
---|---|---|
string | fontFile |