diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-02 22:39:11 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-02 22:40:19 +0200 |
| commit | 96f92ddd8ea1554766b358333e911f607c3e5d6c (patch) | |
| tree | afc26a32d4c42c752165e4975ab74b597ac4c09f /internal/ascii/fonts.go | |
| parent | 7afe4c2c1afe9d8f4ba8887758523999fde12b7b (diff) | |
- Add 4 new ASCII art fonts (mono12, rebel, ansi, ansiShadow) adapted from pomo project
- Implement random font selection on startup when no font is specified
- Add 'f' hotkey in live mode to cycle through fonts
- Update LICENSE with MIT attribution for pomo fonts
- Update README with comprehensive font documentation
- Bump version to v0.3.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/ascii/fonts.go')
| -rw-r--r-- | internal/ascii/fonts.go | 439 |
1 files changed, 439 insertions, 0 deletions
diff --git a/internal/ascii/fonts.go b/internal/ascii/fonts.go new file mode 100644 index 0000000..daea4bb --- /dev/null +++ b/internal/ascii/fonts.go @@ -0,0 +1,439 @@ +// Package ascii provides ASCII art fonts for timer display. +// This code is adapted from https://github.com/Bahaaio/pomo +// Copyright (c) 2025 Bahaa El Deen Mohamed +// Licensed under the MIT License +package ascii + +type Font [11]string + +const ( + Mono12 = "mono12" + Rebel = "rebel" + Ansi = "ansi" + AnsiShadow = "ansiShadow" + Doom = "doom" // figlet doom font + DefaultFont = Mono12 +) + +// AllFonts returns a list of all available font names. +// This includes both ASCII art fonts and the figlet doom font. +var AllFonts = []string{Doom, Mono12, Rebel, Ansi, AnsiShadow} + +var fonts = map[string]Font{ + Mono12: { + ` + ▄▄▄▄ + ██▀▀██ + ██ ██ + ██ ██ ██ + ██ ██ + ██▄▄██ + ▀▀▀▀ +`, + ` + ▄▄▄ + █▀██ + ██ + ██ + ██ + ▄▄▄██▄▄▄ + ▀▀▀▀▀▀▀▀ +`, + ` + ▄▄▄▄▄ + █▀▀▀▀██▄ + ██ + ▄█▀ + ▄█▀ + ▄██▄▄▄▄▄ + ▀▀▀▀▀▀▀▀ +`, + ` + ▄▄▄▄▄ + █▀▀▀▀██▄ + ▄██ + █████ + ▀██ + █▄▄▄▄██▀ + ▀▀▀▀▀ +`, + ` + ▄▄▄ + ▄███ + █▀ ██ + ▄█▀ ██ + ████████ + ██ + ▀▀ +`, + ` + ▄▄▄▄▄▄▄ + ██▀▀▀▀▀ + ██▄▄▄▄ + █▀▀▀▀██▄ + ██ + █▄▄▄▄██▀ + ▀▀▀▀▀ +`, + ` + ▄▄▄▄ + ██▀▀▀█ + ██ ▄▄▄ + ███▀▀██▄ + ██ ██ + ▀██▄▄██▀ + ▀▀▀▀ +`, + ` + ▄▄▄▄▄▄▄▄ + ▀▀▀▀▀███ + ▄██ + ██ + ██ + ██ + ▀▀ +`, + ` + ▄▄▄▄ + ▄██▀▀██▄ + ██▄ ▄██ + ██████ + ██▀ ▀██ + ▀██▄▄██▀ + ▀▀▀▀ +`, + ` + ▄▄▄▄ + ▄██▀▀██▄ + ██ ██ + ▀██▄▄███ + ▀▀▀ ██ + █▄▄▄██ + ▀▀▀▀ +`, + ` + + ▄▄ + ██ + + ██ + ▀▀ + +`, + }, + + Rebel: { + ` + █████ + ███▒▒▒███ + ███ ▒▒███ +▒███ ▒███ +▒███ ▒███ +▒▒███ ███ + ▒▒▒█████▒ + ▒▒▒▒▒▒ +`, + + ` + ████ +▒▒███ + ▒███ + ▒███ + ▒███ + ▒███ + █████ +▒▒▒▒▒ +`, + + ` + ████████ + ███▒▒▒▒███ +▒▒▒ ▒███ + ███████ + ███▒▒▒▒ + ███ █ +▒██████████ +▒▒▒▒▒▒▒▒▒▒ +`, + + ` + ████████ + ███▒▒▒▒███ +▒▒▒ ▒███ + ██████▒ + ▒▒▒▒▒▒███ + ███ ▒███ +▒▒████████ + ▒▒▒▒▒▒▒▒ +`, + + ` + █████ █████ +▒▒███ ▒▒███ + ▒███ ▒███ █ + ▒███████████ + ▒▒▒▒▒▒▒███▒█ + ▒███▒ + █████ + ▒▒▒▒▒ +`, + + ` + ██████████ +▒███▒▒▒▒▒▒█ +▒███ ▒ +▒█████████ +▒▒▒▒▒▒▒▒███ + ███ ▒███ +▒▒████████ + ▒▒▒▒▒▒▒▒ +`, + + ` + ████████ + ███▒▒▒▒███ +▒███ ▒▒▒ +▒█████████ +▒███▒▒▒▒███ +▒███ ▒███ +▒▒████████ + ▒▒▒▒▒▒▒▒ +`, + + ` + ██████████ +▒███▒▒▒▒███ +▒▒▒ ███ + ███ + ███ + ███ + ███ + ▒▒▒ +`, + + ` + ████████ + ███▒▒▒▒███ +▒███ ▒███ +▒▒████████ + ███▒▒▒▒███ +▒███ ▒███ +▒▒████████ + ▒▒▒▒▒▒▒▒ +`, + + ` + ████████ + ███▒▒▒▒███ +▒███ ▒███ +▒▒█████████ + ▒▒▒▒▒▒▒███ + ███ ▒███ +▒▒████████ + ▒▒▒▒▒▒▒▒ +`, + + ` + + ██ + ▒▒ + + + ██ + ▒▒ + + +`, + }, + + Ansi: { + ` + ██████ +██ ████ +██ ██ ██ +████ ██ + ██████ +`, + + ` + ██ +███ + ██ + ██ + ██ +`, + + ` +██████ + ██ + █████ +██ +███████ +`, + + ` +██████ + ██ + █████ + ██ +██████ +`, + + ` +██ ██ +██ ██ +███████ + ██ + ██ +`, + + ` +███████ +██ +███████ + ██ +███████ +`, + + ` + ██████ +██ +███████ +██ ██ + ██████ +`, + + ` +███████ + ██ + ██ + ██ + ██ +`, + + ` + █████ +██ ██ + █████ +██ ██ + █████ +`, + + ` + █████ +██ ██ + ██████ + ██ + █████ +`, + + ` + + ██ + + ██ + +`, + }, + + AnsiShadow: { + ` + ██████╗ +██╔═████╗ +██║██╔██║ +████╔╝██║ +╚██████╔╝ + ╚═════╝ +`, + + ` + ██╗ +███║ +╚██║ + ██║ + ██║ + ╚═╝ +`, + + ` +██████╗ +╚════██╗ + █████╔╝ +██╔═══╝ +███████╗ +╚══════╝ +`, + + ` +██████╗ +╚════██╗ + █████╔╝ + ╚═══██╗ +██████╔╝ +╚═════╝ +`, + + ` +██╗ ██╗ +██║ ██║ +███████║ +╚════██║ + ██║ + ╚═╝ +`, + + ` +███████╗ +██╔════╝ +███████╗ +╚════██║ +███████║ +╚══════╝ +`, + + ` + ██████╗ +██╔════╝ +███████╗ +██╔═══██╗ +╚██████╔╝ + ╚═════╝ +`, + + ` +███████╗ +╚════██║ + ██╔╝ + ██╔╝ + ██║ + ╚═╝ +`, + + ` + █████╗ +██╔══██╗ +╚█████╔╝ +██╔══██╗ +╚█████╔╝ + ╚════╝ +`, + + ` + █████╗ +██╔══██╗ +╚██████║ + ╚═══██║ + █████╔╝ + ╚════╝ +`, + + ` + + ██╗ + ╚═╝ + ██╗ + ╚═╝ + +`, + }, +} |
