Skip to content
ConsoleMonster

API Reference

Class

SymbolFallback

Namespace ConsoleMonster.Glyphs
Assembly ConsoleMonster
Modifiers static

What emoji and special symbols become on glyph tiers that cannot show them: ✅ is √ on the Basic tier and [OK] on ASCII, ⚠️ is !, ❌ is × or x, ➜ is → or ->. Applied to text that goes through markup or rich text (widget labels, titles, table cells, log lines) before it is measured, so widths stay right. The Full tier shows the text as written. Apps add or change entries with SymbolFallback.Register.

Inheritance

  • Object
  • SymbolFallback

Methods

Apply 2 overloads
public static String Apply(String text, GlyphTier tier) #
Returns: String

Replaces the known symbols in a text for a tier. On the Basic and ASCII tiers it also drops emoji variation selectors and joiners that would be left alone.

Parameters

text System.String requiredposition: 0
The text.
tier ConsoleMonster.Capabilities.GlyphTier requiredposition: 1
The glyph tier.

Returns

The text for that tier.

public static StyledText Apply(StyledText text, GlyphTier tier) #
Returns: StyledText

Applies the fallback to every span of styled text.

Parameters

text ConsoleMonster.Text.StyledText requiredposition: 0
The styled text.
tier ConsoleMonster.Capabilities.GlyphTier requiredposition: 1
The glyph tier.

Returns

The text for that tier (the same instance when nothing changed).

public static Void Register(String symbol, String basic, String ascii) #
Returns: Void

Adds or replaces the fallback for a symbol.

Parameters

symbol System.String requiredposition: 0
The symbol as written (an emoji with or without its variation selector).
basic System.String requiredposition: 1
What the Basic tier shows.
ascii System.String requiredposition: 2
What the ASCII tier shows.
public static Boolean TryGet(String symbol, GlyphTier tier, out String fallback) #
Returns: Boolean

The fallback of a symbol for a tier.

Parameters

symbol System.String requiredposition: 0
The symbol.
tier ConsoleMonster.Capabilities.GlyphTier requiredposition: 1
The glyph tier.
fallback System.String requiredposition: 2
The text to show instead (the symbol itself on the Full tier).

Returns

Whether the symbol has an entry.

Properties

public static Boolean Enabled { get; set; } #

Whether the fallback is applied (default true).