Sharpie
Search Results for

    Show / Hide Table of Contents
    • Sharpie
      • Canvas
      • Canvas.CheckGlyphStyle
      • Canvas.FillStyle
      • Canvas.GlyphSize
      • Canvas.GradientGlyphStyle
      • Canvas.LineStyle
      • Canvas.Orientation
      • Canvas.ShadeGlyphStyle
      • Canvas.TriangleGlyphStyle
      • CaretMode
      • ClearStrategy
      • ColorManager
      • ColorMixture
      • ColorMode
      • ControlCharacter
      • CursesException
      • CursesInitializationException
      • CursesOperationException
      • CursesSynchronizationException
      • DelegateEvent
      • Event
      • EventPump
      • EventType
      • Key
      • KeyEvent
      • KeySequenceResolver
      • ModifierKey
      • MouseActionEvent
      • MouseButton
      • MouseButtonState
      • MouseMoveEvent
      • Pad
      • ReplaceStrategy
      • ResolveEscapeSequenceFunc
      • Screen
      • SoftLabelKeyAlignment
      • SoftLabelKeyManager
      • SoftLabelKeyMode
      • StandardColor
      • StartEvent
      • StopEvent
      • Style
      • StyledText
      • SubPad
      • SubWindow
      • Surface
      • Terminal
      • TerminalOptions
      • TerminalResizeEvent
      • TerminalSurface
      • VideoAttribute
      • Window
    • Sharpie.Abstractions
      • IAsciiFont
      • IColorManager
      • ICursesBackend
      • ICursesBackend.ripoffline_callback
      • IDrawSurface
      • IDrawable
      • IEventPump
      • IInterval
      • IPad
      • IScreen
      • ISoftLabelKeyManager
      • ISubPad
      • ISubWindow
      • ISurface
      • ITerminal
      • ITerminalSurface
      • IWindow
    • Sharpie.Backend
      • ComplexChar
      • CursesBackend
      • CursesBackendFlavor
      • CursesBackendType
      • CursesCharEvent
      • CursesEvent
      • CursesKeyEvent
      • CursesMouseEvent
      • CursesMouseState
      • CursesResizeEvent
      • NCursesKeyCode
      • PdCursesKeyCode
    • Sharpie.Font
      • AsciiFont
      • AsciiFontLayout
      • DosCp866AsciiFont
      • FigletFont

    Class FigletFont

    FIGlet ASCII font. See http://www.jave.de/figlet/figfont.html and https://github.com/cmatsuoka/figlet for details and available fonts.

    Inheritance
    object
    AsciiFont
    FigletFont
    Implements
    IAsciiFont
    Inherited Members
    AsciiFont.Baseline
    AsciiFont.Height
    AsciiFont.Name
    AsciiFont.Layout
    AsciiFont.GetGlyph(Rune, Style)
    AsciiFont.GetGlyphs(string, Style)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    AsciiFont.GetGlyphs(ReadOnlySpan<Rune>, Style)
    Exceptions
    Type Condition
    ArgumentException

    Thrown if chars is empty.

    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

    true if the font contains the given glyph; false otherwise.

    Overrides
    AsciiFont.HasGlyph(Rune)

    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 path is null or empty.

    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 reader is null.

    ArgumentException

    Thrown if name is null or empty.

    Implements

    IAsciiFont
    In this article
    Back to top Generated by DocFX