Problem
Headings in view mode are just bold text — they don't feel visually distinct or impactful. mdfried-style large titles would make view mode feel more like a polished reading experience.
Context
View mode renders H1/H2/H3 as plain styled text via lipgloss in renderViewBlock() (internal/editor/render.go:713-723). Heading styles are defined in internal/theme/theme.go as HeadingStyle{Text: TextStyle{Bold, Italic, Color, ...}}. View mode centers content within viewMaxWidth = 72 (internal/editor/editor.go:258).
mdfried uses Kitty text sizing protocol or cosmic-text rasterization, but both require terminal graphics protocol support. For a Go/Bubble Tea app, figlet-style ASCII art is the practical approach — works in all terminals, no protocol detection needed, and fits the aesthetic.
Go libraries: github.com/common-nighthawk/go-figure or github.com/lukesampson/figlet for FIGlet font rendering.
Key files:
internal/editor/render.go — renderViewBlock() (lines 692-808), heading render cases
internal/theme/theme.go — HeadingStyle struct, theme presets
internal/editor/editor.go — viewMaxWidth constant, view mode logic
Approach
Use a Go FIGlet library to render H1 text as multi-line ASCII art in view mode only. H2/H3 stay as styled text (large ASCII art for all heading levels would be noisy).
- Add a FIGlet font field to
HeadingStyle (e.g., ArtFont string) so themes can pick their own font (or disable with empty string)
- In
renderViewBlock(), detect H1 + non-empty ArtFont → render via figlet instead of plain text
- Center the ASCII art output within
viewMaxWidth
- Edit mode stays unchanged — ASCII art headings are a view-mode-only enhancement
- Truncate or fall back to plain text if the ASCII art exceeds terminal width
Tasks
Acceptance criteria
Problem
Headings in view mode are just bold text — they don't feel visually distinct or impactful. mdfried-style large titles would make view mode feel more like a polished reading experience.
Context
View mode renders H1/H2/H3 as plain styled text via lipgloss in
renderViewBlock()(internal/editor/render.go:713-723). Heading styles are defined ininternal/theme/theme.goasHeadingStyle{Text: TextStyle{Bold, Italic, Color, ...}}. View mode centers content withinviewMaxWidth = 72(internal/editor/editor.go:258).mdfried uses Kitty text sizing protocol or cosmic-text rasterization, but both require terminal graphics protocol support. For a Go/Bubble Tea app, figlet-style ASCII art is the practical approach — works in all terminals, no protocol detection needed, and fits the aesthetic.
Go libraries:
github.com/common-nighthawk/go-figureorgithub.com/lukesampson/figletfor FIGlet font rendering.Key files:
internal/editor/render.go—renderViewBlock()(lines 692-808), heading render casesinternal/theme/theme.go—HeadingStylestruct, theme presetsinternal/editor/editor.go—viewMaxWidthconstant, view mode logicApproach
Use a Go FIGlet library to render H1 text as multi-line ASCII art in view mode only. H2/H3 stay as styled text (large ASCII art for all heading levels would be noisy).
HeadingStyle(e.g.,ArtFont string) so themes can pick their own font (or disable with empty string)renderViewBlock(), detect H1 + non-emptyArtFont→ render via figlet instead of plain textviewMaxWidthTasks
go-figurevsfigletvs vendoring a minimal implementation)ArtFont stringfield toHeadingStyleininternal/theme/theme.gorenderViewBlock()ininternal/editor/render.goto render H1 as ASCII art whenArtFontis setAcceptance criteria