Class FigletFont
FIGlet ASCII font. See http://www.jave.de/figlet/figfont.html and https://github.com/cmatsuoka/figlet for details and available fonts.
Implements
Inherited Members
Namespace: Sharpie.Font
Assembly: sharpie.dll
Syntax
[PublicAPI]
public sealed class FigletFont : AsciiFont, IAsciiFont
Methods
GetGlyphs(ReadOnlySpan<Rune>, Style)
Tries to get a drawing for a given list of chars
.
Declaration
public override IDrawable GetGlyphs(ReadOnlySpan<Rune> chars, Style style)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<Rune> | chars | The characters. |
Style | style | The style to apply to the glyphs. |
Returns
Type | Description |
---|---|
IDrawable | The output glyphs. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
HasGlyph(Rune)
Checks if the font contains a given glyph.
Declaration
public override bool HasGlyph(Rune @char)
Parameters
Type | Name | Description |
---|---|---|
Rune | char | The character. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
LoadAsync(string)
Loads a FIGlet font file from a given file at path
.
Declaration
public static Task<FigletFont> LoadAsync(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The font file name. |
Returns
Type | Description |
---|---|
Task<FigletFont> | A FigletFont instance. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if |
LoadAsync(string, TextReader)
Loads a FIGlet font file from a given reader
.
Declaration
public static Task<FigletFont> LoadAsync(string name, TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the font. |
TextReader | reader | The reader. |
Returns
Type | Description |
---|---|
Task<FigletFont> | A FigletFont instance. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ArgumentException | Thrown if |