Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@caddoo
Copy link
Contributor

@caddoo caddoo commented Jun 19, 2025

[DO NOT MERGE]

Description

There are currently inconsistencies between the UI test results in CI and those run locally in DDEV — particularly around font rendering (e.g., anti-aliasing, subpixel differences).

This change addresses two key issues:

  1. Font rendering parity
    It introduces system-level fontconfig settings to ensure consistent anti-aliasing and subpixel rendering between CI and DDEV.

  2. Consistent Chromium version
    It forces the use of Puppeteer v8’s bundled Chromium (revision 856583), which matches what CI runs.

Additionally, this update sets the architecture to linux/amd64 to ensure Puppeteer can install and run the correct Chromium binary. Newer versions of Puppeteer support arm64, but v8 does not.


For Apple Silicon Users

If you're using a Mac with Apple Silicon (M1/M2):

  • Make sure Rosetta is enabled in Docker Desktop → Settings → Features in development → Use Rosetta for x86/amd64 emulation on Apple Silicon. This will improve the emulation performance.

Known Issue: Node Architecture Mismatch

On Apple Silicon, Docker may pull a version of Node.js that does not match the forced amd64 platform. If Puppeteer fails to run or Chromium won’t launch, run the following inside the container:

ddev ssh

sudo apt-get purge -y nodejs npm
sudo rm -rf /usr/local/bin/node /usr/local/bin/npm ~/.n
sudo apt-get update
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
hash -r

This installs an amd64-compatible Node.js build that matches the Puppeteer/Chromium environment.


Notes

Some UI tests still fail, but font rendering is now significantly more consistent across environments.

This lays the groundwork for further snapshot cleanup or visual regression stabilization.

Review

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2025

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Jul 3, 2025
@github-actions github-actions bot removed the Stale The label used by the Close Stale Issues action label Jul 16, 2025
@snake14
Copy link
Contributor

snake14 commented Jul 17, 2025

LGTM. It increased the number of UI test cases which pass when I run them on my Ubuntu host. 👍

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2025

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Aug 1, 2025
@sgiehl
Copy link
Member

sgiehl commented Aug 11, 2025

@caddoo What's needed to get that into a mergable state? On windows / wsl those changes seem to work without issues and the test results are a lot more accurate, compared to the current state.
Is there anything we need to do regarding the possible MacOS problem mentioned in the description?

@github-actions github-actions bot removed the Stale The label used by the Close Stale Issues action label Aug 12, 2025
@michalkleiner
Copy link
Contributor

We can certainly immediately take the addition in .ddev/web-build/Dockerfile.fonts, that should also improve things on its own. Then we can re-test the architecture change on MacOS systems.

@github-actions
Copy link
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Aug 29, 2025
@github-actions github-actions bot removed the Stale The label used by the Close Stale Issues action label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants