Skip to content

Provide an option to enable DirectWrite #1896

Closed

Description

@luca-moser

I am using VS Code on a 4k monitor (ASUS PB287Q 4K) and have set Windows 10's scaling on that monitor to 150%. VSCode fonts inside the editor are extremely blurry.

Look at this example (scaling in Windows 10: 150%, editor.fontSize:: 13, window.zoomLevel: 0):
vc4k_blurry

The code in the background is very blurry (please open the image in a new tab to really see it), while the dialog in the foreground is not (just for comparison).

I tried to play around with the edtior.fontSize/window.zoomLevel options, but there isn't any way to get the font crisp. Using --disable-direct-write and --force-device-scale-factor=1.0 to start VS Code also doesn't fix the issue.

Activity

  1. changed the title [-]VS Code editor fonts look blurry when scaling[/-] [+]VS Code editor fonts look blurry on Windows scaled monitor[/+] on Jan 9, 2016
  2. changed the title [-]VS Code editor fonts look blurry on Windows scaled monitor[/-] [+]VS Code editor fonts look blurry on Windows 10 scaled monitor[/+] on Jan 9, 2016
  3. rickmed commented on Jan 9, 2016

    @rickmed

    +1

  4. alexdima commented on Jan 12, 2016

    @alexdima
    Member

    cc Erich Gamma (@egamma)

    Benjamin Pasero (@bpasero) Looking at electron/electron#3349 looks like we still have a blurry font issue on windows until we adopt an Electron version with Chrome 47 -- the patch of Electron v0.34.4 only covers Linux.

  5. bpasero commented on Jan 12, 2016

    @bpasero
    Contributor
  6. added
    bug
    upstream
    on Jan 12, 2016
  7. kanreisa commented on Jan 13, 2016

    @kanreisa

    👍

  8. changed the title [-]VS Code editor fonts look blurry on Windows 10 scaled monitor[/-] [+]VS Code is blurry on high DPI monitors (Windows 10, 125%)[/+] on Feb 3, 2016
  9. changed the title [-]VS Code is blurry on high DPI monitors (Windows 10, 125%)[/-] [+]VS Code is blurry on high DPI monitors (Windows 10, 150%)[/+] on Feb 3, 2016
  10. SeriousM commented on Feb 9, 2016

    @SeriousM

    Any updates on that?
    The blurriness is really annoying!

    (notice the blur-effect on two different documents)
    image

  11. 94 remaining items

  12. bpasero commented on Sep 10, 2018

    @bpasero
    Contributor

    We are building exploration builds that use a much newer version of Electron (our UI framework). I wonder if this issue reproduces with one of these builds, could you try? Download:

  13. added
    info-needed
    on Sep 10, 2018
  14. anacondaq commented on Sep 10, 2018

    @anacondaq

    Benjamin Pasero (@bpasero) the problem with DirectWrite on windows. If you have a way to return back DirectWrite flag (chrome://flags) like on CentBrowser to turn off DirectWrite and render all text via GDI+ the solution will solve the issue.

    Btw, these 1.28 builds run SO smoothly and fast. Noticeable differences. Good work.

  15. changed the title [-]VS Code is blurry on high DPI monitors (Windows 10, 150%)[/-] [+]Provide an option to enable DirectWrite[/+] on Sep 10, 2018
  16. removed
    info-needed
    on Sep 10, 2018
  17. merill commented on Sep 12, 2018

    @merill

    Benjamin Pasero (@bpasero) This exploration build fixed the blurriness on my 43' 4K monitor scaled to 125% on 3840 x 2160. Thanks!!

  18. unode commented on Oct 29, 2018

    @unode

    I'm experiencing a similar issue in Linux although in this case it seems to be due to a non-uniform aliasing effect across the screen.

    The following are 2 screenshots taken on:
    screenshot_2018-10-29_21-08-48_875055699

    The font used is Envy Code R at 2 different sizes:

    Size 13:
    screenshot_2018-10-29_21-28-44_890043110

    Here you can see a rainbow-like effect across the screen. The pattern changes every 14 characters cycling 4 different color patterns. green, orange, violet, blue, green, ...
    m was used as it makes the aliasing effect more noticeable.

    Size 14:
    screenshot_2018-10-29_21-03-33_971367519
    Similar situation but here the rendering cycles every character and contrary to the previous it alternates between 2 patterns only.

    Using --disable-gpu has no effect.

    In contrast the same font and size on rxvt-unicode displays no such artifacts:
    screenshot_2018-10-29_21-24-43_615369488

    What is even more disturbing is that the font renders perfectly in the embedded terminal:
    screenshot_2018-10-29_21-27-01_512520030
    Even better than in rxvt-unicode (IMO).

  19. bpasero commented on Oct 9, 2019

    @bpasero
    Contributor

    Given #15211 (comment) there will be a way to configure Chrome command line switches to be used on each startup. If there is a specific flag that makes the situation better for users, please let me know and we can think about supporting it there.

    Otherwise I would like to close this issue as it seems not actionable from the VSCode side of things.

  20. added
    info-needed
    on Oct 10, 2019
  21. jeanabraham commented on Nov 27, 2019

    @jeanabraham

    I'm not sure this is specific to Windows; here's screenshots of VS Code (1.20.0) from my MacBook (Mac OS High Sierra) connected to a monitor. Left is the MacBook (2017 12" MacBook) screen and right is the external screen (an LG 29" 1080p Ultrawide).

    screen shot 2018-02-11 at 14 46 27

    As mentioned above; it's not just the editor, all of the text including tabs and explorer are blurry on the external screen. Happens even if I launch Code on the second display, so I don't think it's related to dragged the window from one to the other.

    Danny Tuppeny (@DanTup) I'm noticing the same with my macbook vs ultrawide monitor. However, I find that the fonts of my Terminal window are extremely clear even on the ultrawide. Were you able to figure out how to make the text sharp on VScode by any chance? Thanks!

  22. DanTup commented on Nov 27, 2019

    @DanTup
    Contributor

    Jean Abraham (@jeanabraham) I didn't figure it out - I tend to always use VS Code directly on the MacBook screen instead. My terminal is also fuzzy on the external screen - though I remember seeing some popup about terminal performance once offering to change renderer - I don't remember if I agreed or not, but maybe that's a reason for a difference.

  23. jeanabraham commented on Nov 29, 2019

    @jeanabraham

    Danny Tuppeny (@DanTup) thanks! Ok. I decided I'll just trade in my ultrawide for 4k instead!

  24. DanTup commented on Nov 29, 2019

    @DanTup
    Contributor

    It's kinda funny that that might be the easiest fix 😄

  25. locked and limited conversation to collaborators on Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

electronfont-renderinginfo-neededupstream

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions