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

codicons force grayscale text rendering #84584

Closed
alexdima opened this issue Nov 12, 2019 · 4 comments
Closed

codicons force grayscale text rendering #84584

alexdima opened this issue Nov 12, 2019 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug lcd-text-rendering verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

alexdima commented Nov 12, 2019

  • on Windows
  • run yarn run web
  • open in Edge Dev
  • look at the text inside a tab with the magnifier
  • observe it uses grayscale antialising

image

This is caused directly by the following CSS -

/* Hack to get web rendering to align to pixel grid */
transform: rotate(0);
-webkit-transform: rotate(0.1deg);
-moz-transform: rotate(0);

fyi @aeschli @bpasero @deepak1556

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Nov 12, 2019
@alexdima
Copy link
Member Author

After removing that CSS:
image

@alexdima
Copy link
Member Author

@misolori It is not clear to me why that CSS with the rotation was added. It came in recently via ef84173. It has bad effects on grayscale vs lcd text antialising, so I will push a removal for now.

@miguelsolorio
Copy link
Contributor

miguelsolorio commented Nov 12, 2019

@alexandrudima the CSS transforms were a hack to get the icons to align to the pixel grid and not render blurry (codicons PR). I'm guessing other places where text was affected the icons were not in their separate container but combined with text labels. Here's how it looks on Stable:

image

However, now that these are removed I'm not seeing this pixelation out of sources, which may have been fixed with our recent electron/font smoothing changes?

image

Sorry you had to spend so much time investigating this 🙈. I'll also link to the commits from the vscode-codicons repo that explain more about the changes next time so everyone knows what the commits are about.

@alexdima
Copy link
Member Author

No problem! I think the blurry rendering codicons were suffering from 100% the same issue as the text. Since codicons are fonts they go through the same rendering pipeline as text. So, if Chromium would make a layer to render with grayscale text, then both the text itself and codicons would render with grayscale and appear "blurry".

@roblourens roblourens added the verified Verification succeeded label Dec 4, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug lcd-text-rendering verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants