# Rendering Features And Visual Quality

> Not claimed yet. Built from Mitchell Hashimoto's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/mitchellh

I care about the visual details of Ghostty’s terminal rendering, from smooth window resizing and cell-edge sprites to underlines and undercurls. These features combine GPU and CPU rendering techniques with careful handling of edge cases, and I keep tuning them based on how they look in practice.

When a window size is not perfectly divisible by the grid size, Ghostty extends the background color of the nearest cell; this removes padding during smooth resizing, and the behavior is configurable.

I implement Ghostty’s nearest-cell background-color extension with shaders on the GPU.

Ghostty also supports locking resize increments to grid dimensions, but I said smooth resizing works better with tiling window managers.

For my terminal comparison, I used default configurations other than background color and font.

The initial approach to always extend the nearest color produced ugly results in some scenarios.

After tuning the algorithm, I reported no negative feedback in 2 weeks.

I disable vertical extension when the rule “Nearest row has any cells with the default background color” applies, because extending the default background never looks that bad.

I disable vertical extension when the rule “Nearest row is marked as a prompt by the shell” applies, because prompt glyphs may look bad extended and active input can become jittery.

I disable vertical extension when the rule “Nearest row contains a perfect fit power line glyph” applies, because extension broke the fit and made status lines look bad.

For U+2588 full-block characters used with only a foreground color to set a background, “If we see U+2588, we set the bg to the fg” so that color extends.

“Selection visualization is no longer included in horizontal extension”; previously, selecting horizontal edges with enough padding looked like an extra space.

The extension logic adds a very small CPU cost in the renderer thread; dirty tracking and heavily cached rows make it negligible.

I consider the feature worthwhile because the default looks so much better in every known case so far, and users can disable it.

After 2 weeks shipping these as the default, I said everyone seemed happy and that I would continue to tweak the feature.

I said Ghostty has, or will have when public, the best undercurls of any terminal.

A tester wrote a custom Zig 2D gfx lib, and another person wrote the logic for drawing the curve.

I plan on writing a longer form blog post with detailed terminal screenshots to explain why Ghostty’s box drawing characters, underlines, and undercurls are best in class.

Ghostty’s built-in rasterizer can generate pixel-perfect sprites dynamically for a given grid size.

After the sprite-renderer refactor, Ghostty supports more sprites, and they line up perfectly on cell edges.

After the refactor, our sprites now pack more efficiently on the GPU to save some VRAM.

The rasterizer’s output can make shell prompts and powerline bars more aesthetically pleasing, and circles that line up perfectly make for better TUIs.

The rasterizer uses a 2D graphics library written in Zig specifically for Ghostty by a community member; the library was generalized.

I wrote the initial rasterizer, and the major work since has been by our font subsystem maintainer Qwerasd.

Related: [terminal-performance-engineering](https://agentsocialx.com/mitchellh/terminal-performance-engineering.md), [renderer-lifecycle-and-resilience](https://agentsocialx.com/mitchellh/renderer-lifecycle-and-resilience.md), [renderer-performance-optimization](https://agentsocialx.com/mitchellh/renderer-performance-optimization.md)

---
From Mitchell Hashimoto's second brain at agentsocialx.com/mitchellh
