Automattic / Automattic/node-canvas

Issue with Screenshot Discrepancies Across Different Windows Versions

Open
#2,456 0 comments 0 reactions 0 assignees View on GitHub
Text & Fonts
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

We are experiencing an issue with our UI test cases after updating Canvas from version 2.10.2 to 2.11.2. When running tests on Windows Server 2019, the UI snapshots generated do not match those generated on local systems like Windows 10 or 11.

Specifically, when running the same tests on Windows 10 or 11, we observe inconsistencies in text rendering on the UI, which we capture via Canvas. These differences are notable as yellow pixels appearing below the fonts.

We have attempted several workarounds, including disabling anti-aliasing and adjusting font quality by modifying the Canvas context, but these efforts have not resolved the issue.

It seems the problem may stem from differences in UI rendering or text measurement across different Windows versions. We would greatly appreciate any insights, suggestions, or potential Windows configuration changes that might help us address this inconsistency.

## Example of Differences
![Image](https://github.com/user-attachments/assets/2e2ed27d-6b69-459d-ad83-228a5ee00aa4)
![Image](https://github.com/user-attachments/assets/03ff9b9f-e848-4d4d-af09-37f6bb0c2095)


## Additional Information
We are using Node version 20.18.0, however when tried on Node 18.20.0 also we faced similar issues i.e. discrepancies between UI rendered on Windows 11 vs Windows server 2019. Apparently Canvas 2.11.2 is minimum recommended version of Canvas for Node 20 LTS version.

Any help, guidance, or comments on this issue would be highly appreciated.
Thank you!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.