A snapshot frame is drawn to the grid's column count, but the grid measures a character at a time while a terminal renders an emoji sequence as one glyph. A row holding one comes out narrower than its frame.
Reproducing, with no window title involved:
Str-width= 14 ╭────────────╮
Str-width= 8 │👨👩👧👦ab │ ← six columns short
Str-width= 14 │ │
Str-width= 14 ╰────────────╯
The grid puts that family emoji in 8 columns (one cell plus 4 continuations) because alacritty_terminal measures with UnicodeWidthChar per character. A terminal draws it in 2, which is what UnicodeWidthStr reports for the whole string. The same gap affects skin-tone modifiers, keycaps, and a base character followed by a variation selector.
Measured on unicode-width 0.2.2:
| sequence |
per character |
whole string |
👨👩👧👦 |
8 |
2 |
👍🏽 |
4 |
2 |
1️⃣ |
1 |
2 |
❤️ |
1 |
2 |
This predates #91 and is independent of it: #91 only made the title measure whole strings, since it is a string we place rather than grid content. Fixing the rows means changing how the grid assigns cells to a sequence, which is a decision about the emulator seam rather than about the serializer, and would want the same treatment in every backend.
Worth deciding whether shell-use follows its emulator here or groups sequences itself before the two disagree somewhere more visible than a snapshot border.
A snapshot frame is drawn to the grid's column count, but the grid measures a character at a time while a terminal renders an emoji sequence as one glyph. A row holding one comes out narrower than its frame.
Reproducing, with no window title involved:
The grid puts that family emoji in 8 columns (one cell plus 4 continuations) because
alacritty_terminalmeasures withUnicodeWidthCharper character. A terminal draws it in 2, which is whatUnicodeWidthStrreports for the whole string. The same gap affects skin-tone modifiers, keycaps, and a base character followed by a variation selector.Measured on
unicode-width0.2.2:👨👩👧👦👍🏽1️⃣❤️This predates #91 and is independent of it: #91 only made the title measure whole strings, since it is a string we place rather than grid content. Fixing the rows means changing how the grid assigns cells to a sequence, which is a decision about the emulator seam rather than about the serializer, and would want the same treatment in every backend.
Worth deciding whether shell-use follows its emulator here or groups sequences itself before the two disagree somewhere more visible than a snapshot border.