Cell-edge issues rendering box-drawing characters and colored backgrounds #558

Closed
opened 2026-01-30 21:55:13 +00:00 by claunia · 2 comments
Owner

Originally created by @LurkingKiwi on GitHub (Feb 13, 2019).

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Version 10.0.17134.407, Intel Core i7-7700 embedded graphics, Full HD, 100%
  • What you're doing and what's happening:
    Our console app uses WriteConsoleOutputCharacterW, WriteConsoleOutputAttribute, FillConsoleOutputCharacterW, FillConsoleOutputAttribute etc.
    We draw on-screen boxes and menus using the box-drawing characters. When a sequence of characters is drawn in a single API call, the glyphs are contiguous. If written one at a time in adjacent locations, single pixel (I think) gaps separate the horizontal lines. The right-hand extension in the first image is done char-at-a-time, the horizontals in the tabs were done as single writes.
    We use a green background to indicate entry fields. When no text is written to the field cells, they draw slightly narrower than cells with text.
    I noticed something like this in the past, where writing a field to spaces to erase it then writing something in (or vice-versa, can't remember) left hairlines at the left and right edges of the region in question. This was hidden by carefully sequencing the write operations.
    This behaviour appears on some PCs in our company but not others.
    Previously I thought changing the font size fixed it, but not at present. This may be because the artifacts do not seem to appear for non-Unicode screen drawing using the same font and size.
    Note that choosing properties, font, OK causes the screen to redraw and all lines are contiguous until redrawn by the application when the gaps reappear.
    I normally use Lucida Console 18, but the same effect occurs with Consolas and at other font sizes. The image snippets captured use extra-large fonts for detail.

lucida_36_gaps
lucida_20_wiggles

  • What's wrong / what should be happening instead:
    Line-drawing characters should be contiguous, backgrounds should be uniformly sized.
Originally created by @LurkingKiwi on GitHub (Feb 13, 2019). * Your Windows build number: (Type `ver` at a Windows Command Prompt) Version 10.0.17134.407, Intel Core i7-7700 embedded graphics, Full HD, 100% * What you're doing and what's happening: Our console app uses WriteConsoleOutputCharacterW, WriteConsoleOutputAttribute, FillConsoleOutputCharacterW, FillConsoleOutputAttribute etc. We draw on-screen boxes and menus using the box-drawing characters. When a sequence of characters is drawn in a single API call, the glyphs are contiguous. If written one at a time in adjacent locations, single pixel (I think) gaps separate the horizontal lines. The right-hand extension in the first image is done char-at-a-time, the horizontals in the tabs were done as single writes. We use a green background to indicate entry fields. When no text is written to the field cells, they draw slightly narrower than cells with text. I noticed something like this in the past, where writing a field to spaces to erase it then writing something in (or vice-versa, can't remember) left hairlines at the left and right edges of the region in question. This was hidden by carefully sequencing the write operations. This behaviour appears on some PCs in our company but not others. Previously I thought changing the font size fixed it, but not at present. This may be because the artifacts do not seem to appear for non-Unicode screen drawing using the same font and size. Note that choosing properties, font, OK causes the screen to redraw and all lines are contiguous until redrawn by the application when the gaps reappear. I normally use Lucida Console 18, but the same effect occurs with Consolas and at other font sizes. The image snippets captured use extra-large fonts for detail. ![lucida_36_gaps](https://user-images.githubusercontent.com/47542711/52742509-bc7d2580-303c-11e9-9dcd-2e104a351cd9.png) ![lucida_20_wiggles](https://user-images.githubusercontent.com/47542711/52742514-c2730680-303c-11e9-9d52-d452c870ca63.png) * What's wrong / what should be happening instead: Line-drawing characters should be contiguous, backgrounds should be uniformly sized.
claunia added the Product-ConhostArea-RenderingIssue-BugResolution-Duplicate labels 2026-01-30 21:55:13 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Dec 13, 2021):

You know, I think this is something that just had to get fixed with the new renderer. I believe that Terminal does this a bit better, and a bit worse. I think we're just tracking all the improvements here over in #5897, so I'm gonna close this one out. Sorry it's been left on the backlog so long! /dup #5897

@zadjii-msft commented on GitHub (Dec 13, 2021): You know, I think this is something that just had to get fixed with the new renderer. I believe that Terminal does this a bit better, and a bit worse. I think we're just tracking all the improvements here over in #5897, so I'm gonna close this one out. Sorry it's been left on the backlog so long! /dup #5897
Author
Owner

@ghost commented on GitHub (Dec 13, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Dec 13, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#558