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
FontThe font to use. Font.Custom if you want to use your own font.
fontPath
stringATTENTION: only use the path to the font files for custom fonts.
assembly
AssemblyATTENTION: 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
Font
Gets the font to use. Font.Custom if you want to use your own font.
public Font Font { get; }
Property Value
FontPath
Gets the path to the font files. Null if the font is not custom.
public string? FontPath { get; }
Property Value
SupportedAlphabet
Gets the supported alphabet by the font.
public string SupportedAlphabet { get; }
Property Value
SupportedChars
Gets all the supported characters by the font.
public string SupportedChars { get; }
Property Value
SupportedNumbers
Gets the supported numbers by the font.
public string SupportedNumbers { get; }
Property Value
SupportedSymbols
Gets the supported symbols by the font.
public string SupportedSymbols { get; }
Property Value
Methods
Style(string)
Styles the given text with the font files.
public string[] Style(string text)
Parameters
text
stringThe 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.