Skip to content

fix(render): keep nerd font icons whole - #3

Merged
lnutimura merged 1 commit into
mainfrom
fix/render-icons
Nov 16, 2026
Merged

lnutimura merged 1 commit into
mainfrom
fix/render-icons

Conversation

@lnutimura

Copy link
Copy Markdown
Member

What and why

The README screenshots cut Nerd Font icons in half wherever the next
cell has a background (lualine, bufferline, incline, which-key).
Symbols Nerd Font Mono draws them 1em wide, and a JetBrains Mono cell is
0.6em, so each icon spills into the next cell. The renderer drew each
run with its own background, in order, so that cell covered the icon's
right half. text-align: center didn't help: overflowing text is
start-aligned.

  • scripts/render/page.ts: draw every background before any text,
    as a terminal does, and center each icon on its cell with flexbox so
    it overflows evenly. The cursor is still drawn last, with its
    background.
  • scripts/render/sample/pyproject.toml: enable ruff's DTZ rules.
    The preview shows a DTZ005 warning, but nothing in the sample turned
    the rule on, so a fresh render had none.
  • All seven screenshots re-rendered. They also pick up the current
    LazyVim (e.g. which-key's , now reads "Switch Buffer").

Checks

  • make test

  • make test-plugins (if a plugin integration changed)

    No plugin integration changed.

  • make lint (stylua, Biome, tsc)

    pnpm isn't installed here; ran its steps directly: stylua --check .,
    biome check . and tsc --noEmit all pass.

  • make sync leaves lua/mistpine/palette.lua unchanged

    Not run; this PR doesn't touch colors.

Colors

  • Every color is a palette key or a spec blend; no new hex values
  • Bold and italic follow the spec (bold functions, italic strings and comments)
  • palette.lua is not edited by hand (color changes go to mistpine first)

No colorscheme changes; only the screenshot tooling.

Screenshots

which-key, before and after:

Preview, before and after:

Icons are 1em wide against a 0.6em cell, so they spill into the next
cell, whose background was drawn over their right half. Draw all
backgrounds before any text, center each icon on its cell, and enable
ruff's DTZ rules so the preview's warning renders reliably.
@lnutimura
lnutimura merged commit cfd760d into main Nov 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant