[PR #14255] Implement cell size customizations #30033

Open
opened 2026-01-31 09:38:16 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/14255

State: closed
Merged: Yes


Does what it says in the title. After this commit you can customize the height
and width of the terminal's cells. This commit supports parts of CSS'
<length-percentage> data type: Font-size relative sizes as multiples (1.2),
percentage (120%), or advance-width relative (1.2ch), as well as absolute
sizes in CSS pixels (px) or points (pt).

This PR is neither bug free in DxEngine, nor in AtlasEngine.
The former fails to implement glyph advance corrections (for instance #9381),
as well as disallowing glyphs to overlap rows. The latter has the same
overlap issue, but more severely as it tries to shrink glyphs to fit in.

Closes #3498
Closes #14068

Validation Steps Performed

  • Setting height to 1 creates 12pt tall rows
  • Setting height to 1ch creates square cells
  • Setting width to 1 creates square cells
  • Setting width or height to Npx or Npt works
  • Trailing zeroes are trimmed properly during serialization
  • Patching the PR to allow >100 line heights and entering "100.123456"
    displays 6 fractional digits
**Original Pull Request:** https://github.com/microsoft/terminal/pull/14255 **State:** closed **Merged:** Yes --- Does what it says in the title. After this commit you can customize the height and width of the terminal's cells. This commit supports parts of CSS' `<length-percentage>` data type: Font-size relative sizes as multiples (`1.2`), percentage (`120%`), or advance-width relative (`1.2ch`), as well as absolute sizes in CSS pixels (`px`) or points (`pt`). This PR is neither bug free in DxEngine, nor in AtlasEngine. The former fails to implement glyph advance corrections (for instance #9381), as well as disallowing glyphs to overlap rows. The latter has the same overlap issue, but more severely as it tries to shrink glyphs to fit in. Closes #3498 Closes #14068 ## Validation Steps Performed * Setting `height` to `1` creates 12pt tall rows ✅ * Setting `height` to `1ch` creates square cells ✅ * Setting `width` to `1` creates square cells ✅ * Setting `width` or `height` to `Npx` or `Npt` works ✅ * Trailing zeroes are trimmed properly during serialization ✅ * Patching the PR to allow >100 line heights and entering "100.123456" displays 6 fractional digits ✅
claunia added the pull-request label 2026-01-31 09:38:16 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30033