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

Images depend on LCD font smoothing #1

Closed
dferber90 opened this issue Sep 23, 2018 · 0 comments
Closed

Images depend on LCD font smoothing #1

dferber90 opened this issue Sep 23, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@dferber90
Copy link
Owner

Problem

The screenshot puppeteer takes is dependant of the "Use LCD font smoothing when available" setting of Mac OSX.

Consequences:

  • when the setting is changed on the operating system, the tests fail
  • when the setting is enabled and the tests were generated with LCD font smoothing, but are now run on a non-LCD monitor (not sure what is different exactly), the tests suddenly fail

See here for an example of a failing visual regression test caused by this:

image

Solution

There is a chrome-flag called lcd-text-aa at chrome://flags/#lcd-text-aa which we can always disable. Then the screenshots will never use LCD text anti-aliasing. The tests now no longer depend on the monitor or Mac OSX "Use LCD font smoothing when available" setting.

Technical

puppeteer.launch(options) accepts options.args and we can pass --disable-lcd-text to disable the lcd text antialiasing.

@dferber90 dferber90 added the bug Something isn't working label Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant