-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
black lines in background when using midnight commander or neovim #3626
Comments
I suspect this is a duplicate of #455. |
I don't think it's a duplicate. Although that bug also has two screenshots equivalent to the one here, one of them also showing This bug is here talks about the background color (blue) not filling the entire cell, leaving a gap. In this screenshot over here, the period (from the top of a black line to the top of the next black line) is 57 pixels. Also if you magnify and look closely at some repeated piece of text (e.g. all those "4096"s), you'll see that antialiasing goes differently in every second row. In the upper row of each blackline-separated area, horizontal lines (e.g. the ones of digits So a row's height is 28.5 pixels, each text row is presumably 28.5 pixels below the previous one, and here and there (e.g. when rendering the background) rounding to integers kicks in. Totally sounds like a HiDPI related story. |
... although the screenshot of the entire desktop is 1920x1080, which is not HiDPI, unless the screenshot taking software downscaled it in which case who knows what other nasty things it did :) @ducaale What's your monitor's resolution? A few other things to note: Those black lines aren't really black, just something darker than desired. It depends based on the neighboring two background colors. It's different between cyan and blue (under "Command Options Right"), between blue and cyan (under "Name Size Modify time") [yup the order of colors also seems to matter], cyan and white (under "Left File Command") etc. There are some such vertical lines, too, namely either before or after(*) the vertical line drawing chars. (*)Presumably according to the parity, I haven't verified. |
@egmontkob Yes the resolution is 1920x1080 with 150% scaling. |
Indeed those three bugs are the same as this one.
Or rather let's say: #455 is two technically different issues squeezed into one.
How does 150% scaling result in every second row being different? I have no idea :D |
I'm guessing that this is one of those classic D2D 0.5-pixel offset issues 😁 |
I have the same issue, workaround - press "ctrl -" one time (decrease font size), and this issue is getting fixed. Also font size by default looks too big, for instance on Ubuntu it's usually smaller. |
Same issue. Adjusting font size does not fix, whether in json profile or |
@phelps-matthew have you tried fontSize of 10 or 14? |
@ducaale Yes I've tried a large range of sizes. There is one particular font and size combination (Delugia Nerd Font at size 10) that did not result in lines, but this would seem to be a special case. The other fonts I desire still result in horizontal lines even at 10 pt. |
please, someone tell me i'm not weird for thinking this shouldn't be happening. We've been rendering text for more than three decades now. Certainly it's expected that we've figured it out by now? Please |
This workaround does not help. |
There are two antialias modes that can be set on the ID2D1RenderTarget: - one for text/glyph drawing [1] - one for everything else [2] We had to configure that in the RenderTarget. Additionally, when clipping the background color rect, we need to make sure that's aliased too. [3] ## References [1] ID2D1RenderTarget::SetTextAntialiasMode https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-settextantialiasmode [2] ID2D1RenderTarget::SetAntialiasMode https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-setantialiasmode) [3] ID2D1CommandSink::PushAxisAlignedClip https://docs.microsoft.com/en-us/windows/win32/api/d2d1_1/nf-d2d1_1-id2d1commandsink-pushaxisalignedclip) ## Validation Open and interact with midnight commander with the display scaling set to... - 100% - 125% - 150% - 175% - 200% Closes #3626
There are two antialias modes that can be set on the ID2D1RenderTarget: - one for text/glyph drawing [1] - one for everything else [2] We had to configure that in the RenderTarget. Additionally, when clipping the background color rect, we need to make sure that's aliased too. [3] ## References [1] ID2D1RenderTarget::SetTextAntialiasMode https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-settextantialiasmode [2] ID2D1RenderTarget::SetAntialiasMode https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-setantialiasmode) [3] ID2D1CommandSink::PushAxisAlignedClip https://docs.microsoft.com/en-us/windows/win32/api/d2d1_1/nf-d2d1_1-id2d1commandsink-pushaxisalignedclip) ## Validation Open and interact with midnight commander with the display scaling set to... - 100% - 125% - 150% - 175% - 200% Closes #3626
🎉This issue was addressed in #5149, which has now been successfully released as Handy links: |
Lol! Black lines goes out but font's still have line breaks. Tried to change to different fonts - it still breaks vertical lines with space lines |
Environment
Steps to reproduce
Run midnight commander
mc
with fontSize equal to 12 and withcascadia code
orconsolas
font.It is worth noting that with fontSize 14 or 10 the background renders correctly without black lines.
Expected behavior
Background should be blue with no black lines
Actual behavior
Background has black lines
The text was updated successfully, but these errors were encountered: