Posters in macOS Terminal as plain colored cells

Terminal.app draws block elements from the font, with the halves off the
cell's middle, so quadrant posters came out as rows of shifted dots. The
new cover style "cells" uses one background color per cell and no glyph;
auto picks it when TERM_PROGRAM is Apple_Terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
2026-10-21 11:18:03 +02:00
co-authored by Claude Opus 5.5
parent 2aa28c7e18
commit 080ef9ec8e
8 changed files with 42 additions and 13 deletions
+6 -4
View File
@@ -38,12 +38,14 @@ type UI struct {
// Bell also rings the terminal bell for those notifications (default false).
Bell bool `json:"bell,omitempty"`
// CoverStyle selects the block characters posters are drawn with:
// "quadrant" (2x2 pixels per cell, every font has the glyphs), "sextant"
// "quadrant" (2x2 pixels per cell, every font has the glyphs), "cells" (1
// pixel per cell, background colors only, for terminals that draw block
// glyphs unevenly such as macOS Terminal), "sextant"
// (2x3, sharper, needs a font with the Symbols for Legacy Computing
// block, e.g. kitty, WezTerm, foot, Ghostty), "kitty" (real images through
// the Kitty graphics protocol with Unicode placeholders: kitty and
// Ghostty) or "auto" (default: the Kitty protocol where the terminal is
// known to support it, else sextant on terminals known to draw them or when
// known to support it, else cells in macOS Terminal, sextant on terminals known to draw them or when
// fontconfig finds a font with the glyphs, else quadrant). The block styles are also the fallback for "kitty".
CoverStyle string `json:"cover_style,omitempty"`
}
@@ -264,9 +266,9 @@ func (c *Config) Validate() error {
}
}
switch c.UI.CoverStyle {
case "", "auto", "quadrant", "sextant", "kitty":
case "", "auto", "quadrant", "sextant", "cells", "kitty":
default:
errs = append(errs, fmt.Errorf(`ui.cover_style: %q must be "auto", "kitty", "sextant" or "quadrant"`, c.UI.CoverStyle))
errs = append(errs, fmt.Errorf(`ui.cover_style: %q must be "auto", "kitty", "sextant", "quadrant" or "cells"`, c.UI.CoverStyle))
}
return errors.Join(errs...)
}