Icons
NAME
App::Moneymoor::Service::Icons - glyph tiers for the budget/register UI
SYNOPSIS
use App::Moneymoor::Service::Icons;
my $glyphs = icons(); # unicode tier (default)
say $glyphs.cleared-uncleared; # ā
say $glyphs.cleared-cleared; # ā
my $nerd = icons('nerd');
say $nerd.warn; # nerd-font alert glyph
my $fallback = icons('made-up'); # unknown tier -> unicode
say $fallback === icons(); # (equivalent values, unicode tier)
DESCRIPTION
Every glyph the app paints ā the three cleared states, the three
account-kind markers, the transfer arrow, the overspend warning, the
group collapse/expand chevrons, the sidebar gutter bar, the move
arrow, the inflow/outflow arrows, and the budget diamond ā lives on
one immutable App::Moneymoor::Icons value. Two tiers ship today:
unicode(default) ā plain Unicode glyphs that render correctly in any UTF-8-capable terminal, no patched font required.nerdā Nerd Font codepoints, for terminals with a patched font installed. Opt-in viaConfig.icons.
An unrecognised tier name falls back to unicode ā mirrors the
fallback semantics of App::Moneymoor::Themes::load (unknown theme
names silently resolve to the default rather than raising).
Invariant: every accessor on both tiers is exactly one grapheme
(.chars == 1). Row composition in the budget/register tables
assumes single-column glyphs for alignment; a multi-grapheme icon
would shift every column to its right.
EXPORTS
icons(Str $tier = 'unicode' --App::Moneymoor::Icons)> ā look up a tier by name.