Table of Contents

Class TextStyler

Namespace
ConsoleAppVisuals.Models
Assembly
ConsoleAppVisuals.dll

The TextStyler class is a class that styles text with the font files.

public class TextStyler
Inheritance
TextStyler
Inherited Members

Remarks

For more information, consider visiting the documentation available here.

Constructors

TextStyler(Font, string?, Assembly?)

The TextStyler class is a class that styles text with the font files.

public TextStyler(Font source = Font.ANSI_Shadow, string? fontPath = null, Assembly? assembly = null)

Parameters

source Font

The font to use. Font.Custom if you want to use your own font.

fontPath string

ATTENTION: only use the path to the font files for custom fonts.

assembly Assembly

ATTENTION: Debug purposes only. Do not update it.

Remarks

For more information, consider visiting the documentation available here.

Exceptions

EmptyFileException

Thrown when the config.yml file is empty.

Properties

Dictionary

Gets the dictionary that stores the characters and their styled equivalent.

public Dictionary<char, string> Dictionary { get; }

Property Value

Dictionary<char, string>

Font

Gets the font to use. Font.Custom if you want to use your own font.

public Font Font { get; }

Property Value

Font

FontPath

Gets the path to the font files. Null if the font is not custom.

public string? FontPath { get; }

Property Value

string

SupportedAlphabet

Gets the supported alphabet by the font.

public string SupportedAlphabet { get; }

Property Value

string

SupportedChars

Gets all the supported characters by the font.

public string SupportedChars { get; }

Property Value

string

SupportedNumbers

Gets the supported numbers by the font.

public string SupportedNumbers { get; }

Property Value

string

SupportedSymbols

Gets the supported symbols by the font.

public string SupportedSymbols { get; }

Property Value

string

Methods

Style(string)

Styles the given text with the font files.

public string[] Style(string text)

Parameters

text string

The text to style.

Returns

string[]

The styled text as a string array.

Remarks

For more information, consider visiting the documentation available here.

ToString()

Gets the info of the actual style (from the config.yml file).

public override string ToString()

Returns

string

A string compiling these pieces of information.

Remarks

For more information, consider visiting the documentation available here.

Exceptions

EmptyFileException

Thrown when the config.yml file is empty.