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

    Interface IAsciiFont

    Defines the traits implemented by ASCII font providers.

    Namespace: Sharpie.Abstractions
    Assembly: sharpie.dll
    Syntax
    [PublicAPI]
    public interface IAsciiFont

    Properties

    Baseline

    The font baseline.

    Declaration
    int Baseline { get; }
    Property Value
    Type Description
    int

    Height

    The font height.

    Declaration
    int Height { get; }
    Property Value
    Type Description
    int

    Layout

    The font's layout.

    Declaration
    AsciiFontLayout Layout { get; }
    Property Value
    Type Description
    AsciiFontLayout

    Name

    The font's name.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string

    Methods

    GetGlyph(Rune, Style)

    Tries to get a glyph for a given char.

    Declaration
    IDrawable GetGlyph(Rune @char, Style style)
    Parameters
    Type Name Description
    Rune char

    The character.

    Style style

    The style to apply to the glyph.

    Returns
    Type Description
    IDrawable

    The output glyph, if found. Otherwise, the font will substitute the glyph with something else.

    GetGlyphs(ReadOnlySpan<Rune>, Style)

    Tries to get a drawing for a given list of chars.

    Declaration
    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.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if chars is empty.

    GetGlyphs(string, Style)

    Tries to get a drawing for a given text.

    Declaration
    IDrawable GetGlyphs(string text, Style style)
    Parameters
    Type Name Description
    string text

    The text.

    Style style

    The style to apply to the glyphs.

    Returns
    Type Description
    IDrawable

    The output glyphs.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if text is empty.

    HasGlyph(Rune)

    Checks if the font contains a given glyph.

    Declaration
    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.

    In this article
    Back to top Generated by DocFX