Repository navigation
fix(render): keep nerd font icons whole - #3
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: centerdidn't help: overflowing text isstart-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'sDTZrules.The preview shows a DTZ005 warning, but nothing in the sample turned
the rule on, so a fresh render had none.
LazyVim (e.g. which-key's
,now reads "Switch Buffer").Checks
make testmake 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 .andtsc --noEmitall pass.make syncleaveslua/mistpine/palette.luaunchangedNot run; this PR doesn't touch colors.
Colors
palette.luais 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: