microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.07k stars 29.21k forks source link

Editor: subpixel font rendering issue #162936

Open uRohan opened 2 years ago

uRohan commented 2 years ago

Type: Bug

Issue:

Subpixel rendering is broken for some character columns.

Screenshot_20221007_132722

Steps to Reproduce:

  1. Open the attached text file (with a set of characters on which it is easy to spot the problem). Squares.txt

VS Code version: Code - Insiders 1.73.0-insider (fad3a77833b9249158dfd88477114a06435e46a2, 2022-10-07T05:18:21.081Z) OS version: Linux x64 5.19.13-1-default Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz (8 x 3090)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|1, 0, 0| |Memory (System)|7.65GB (3.19GB free)| |Process Argv|--unity-launch --crash-reporter-id d05f2a7e-d301-4bc0-b91d-db5f7c340441| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|/usr/share/xsessions/default| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE| |XDG_SESSION_TYPE|x11|
Extensions: none
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30422396 pythontb:30258533 pythonptprofiler:30281269 vshan820:30294714 pythondataviewer:30285072 vscod805:30301674 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30404738 cppdebug:30492333 vscaat:30438846 vsclangdf:30492506 c4g48928:30535728 dsvsc012cf:30540253 pylantcb52:30568093 vscccc:30564267 pyindex848:30577858 ```
alexdima commented 2 years ago

From the screenshot, I see that the characters are rendered with sub-pixel antialiasing

image

Vertical lines which repeat at a variable distance will end up being mis-aligned to the pixel grid, and sometimes the vertical line will cover 1 pixel, sometime 3 pixels etc.

How does it look when you open Chromium and use https://insiders.vscode.dev/ ?

uRohan commented 2 years ago

In Chromium, it looks like this: Screenshot_20221007_172837