Skip to content
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

Blurry default font on Mac with non-high-dpi display #21577

Closed
chrmarti opened this issue Feb 28, 2017 · 14 comments
Closed

Blurry default font on Mac with non-high-dpi display #21577

chrmarti opened this issue Feb 28, 2017 · 14 comments
Assignees
Labels
electron Issues and items related to Electron font-rendering Font rendering issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@chrmarti
Copy link
Collaborator

  • VSCode Version: Code - Insiders 1.10.0-insider (40fecfa, 2017-02-27T14:09:29.088Z)
  • OS Version: Darwin x64 15.6.0
  • Extensions: none

Default (especially 'e' and 'a' are bad):
screen shot 2017-02-28 at 2 28 10 pm

Font-size 14 helps, but is a little clunky:
screen shot 2017-02-28 at 2 30 39 pm

Fira Code, size 14:
screen shot 2017-02-28 at 2 31 43 pm

Hack, size 14:
screen shot 2017-02-28 at 2 35 07 pm

Fira Code, size 14, with ligatures (which Hack doesn't support):
screen shot 2017-02-28 at 2 45 38 pm

@chrmarti chrmarti added the ux User experience issues label Feb 28, 2017
@alexdima
Copy link
Member

alexdima commented Mar 1, 2017

@chrmarti From zooming in to your screenshots, it appears the font is rendered using subpixel antialising, which was in the past a main source of bluriness:

image

So I think we're doing things ok on our side (i.e. positioning layers at integer coordinates, opaque background, etc.)

Possible related: #9152

Maybe you can try playing with -webkit-font-smoothing: antialiased; ? Does that make a difference for the better?

Specifically on the mac, there are other issues reporting that the text is rendered too thick. Perhaps you can also play with editor.fontWeight ?

@alexdima alexdima added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Mar 1, 2017
@bpasero bpasero added this to the Backlog milestone Mar 1, 2017
@chrmarti
Copy link
Collaborator Author

chrmarti commented Mar 1, 2017

Default:
screen shot 2017-03-01 at 8 18 38 am

-webkit-font-smoothing: antialiased;
screen shot 2017-03-01 at 8 19 20 am

-webkit-font-smoothing: antialiased; font-weight: bold;
screen shot 2017-03-01 at 8 20 05 am

@chrmarti
Copy link
Collaborator Author

chrmarti commented Mar 7, 2017

@alexandrudima See the above. antialiased made it too light, bold counters that, but the result looks worse to my eye than the original.

@alexdima
Copy link
Member

alexdima commented Mar 7, 2017

@chrmarti I agree, all screenshots look bad.

Perhaps some more CSS tweaks if you'd like to try them out on your setup (I think you're using a mac connected to a non-retina display, right?).

Maybe if we find some of these to have a positive effect I can create an editor setting toggling them on/off:

text-rendering

/* Keyword values */
text-rendering: auto;
text-rendering: optimizeSpeed;
text-rendering: optimizeLegibility;
text-rendering: geometricPrecision;

-webkit-text-stroke

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-stroke

-webkit-font-smoothing: subpixel-antialiased

@bpasero bpasero added the electron Issues and items related to Electron label Mar 8, 2017
@chrmarti
Copy link
Collaborator Author

I can't get text-rendering nor subpixel-antialiased to make a difference. Tried stroke width with antialiased:

Stroke width 0.5px:
screen shot 2017-03-09 at 4 02 10 pm

Stroke width 1px:
screen shot 2017-03-09 at 4 02 56 pm

Font smoothing antialiased, stroke width 0.5px:
screen shot 2017-03-09 at 4 03 40 pm

Font smoothing antialiased, stroke width 1px:
screen shot 2017-03-09 at 4 04 00 pm

Using stroke doesn't seem to work well here. Let me know if there are other combinations I should try.

@alexdima
Copy link
Member

I'm sorry, there's nothing more I can think of. Now I'm just fishing in here:

Here are the last CSS knobs I could find in that code that you haven't been through yet (IMHO unlikely they would improve things):

@bpasero
Copy link
Member

bpasero commented Apr 10, 2017

Todays VS Code insider build comes with Electron 1.6.x, would be interesting to hear if this update solves this issue for anyone: http://code.visualstudio.com/Download#insiders

@chrmarti
Copy link
Collaborator Author

Doesn't look like it changed:

Before:
screen shot 2017-03-01 at 8 18 38 am

After:
screen shot 2017-04-11 at 8 17 37 am

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Apr 27, 2017
@alexdima alexdima added font-rendering Font rendering issues and removed bug Issue identified by VS Code Team member as probable bug ux User experience issues workbench labels May 19, 2017
@infojasyrc
Copy link

infojasyrc commented Jun 7, 2017

@chrmarti is really easy to play with css changes without going to "Help > Toggle Developer Tools" in vsCode? are they permanent? I am trying to find a way without open the developers tools with no success. I have a MacBook Air and the font shows the same result as you show in the above files.

@chrmarti
Copy link
Collaborator Author

chrmarti commented Jun 7, 2017

@infojasyrc I did not make any permanent changes to try this. Personally I'm using the Fira Code font with ligatures enabled and size 14. That looks good also on normal resolution displays, my concern here is more with the initial user experience.

@infojasyrc
Copy link

@chrmarti I think It will be great to have a less|sass|any css file to modify this globals settings for VSCode as atom has.

@chrmarti
Copy link
Collaborator Author

chrmarti commented Jun 7, 2017

@infojasyrc That is tracked in #459.

@bpasero
Copy link
Member

bpasero commented Nov 14, 2017

@chrmarti can this be closed?

@chrmarti
Copy link
Collaborator Author

Yes, not actionable.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron font-rendering Font rendering issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants