Skip to content

Commit a448615

Browse files
committed
fix(test): align font rendering between preview and renderer in parity test
The preview browser was rendering Inter via system/fallback fonts while the render pipeline injected embedded Inter woff2 via injectDeterministicFontFaces. On Ubuntu CI, Chromium has no bundled Inter, so the preview fell back to Noto Sans, producing large text-area diffs (YAVG≈18). Two changes align the two sides: - Switch the parity fixture from `font-family: Inter, sans-serif` to `font-family: sans-serif` so the render pipeline sees only a generic family and skips font injection — both browsers use the same Chromium built-in Noto Sans. - Add `--font-render-hinting=none` to the Playwright browser launch args to match the engine's Chrome flags, eliminating sub-pixel hinting differences.
1 parent 1630f7c commit a448615

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/studio/e2e/fixtures/parity-project/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
top: 200px;
3030
left: 200px;
3131
margin: 0;
32-
font-family: Inter, sans-serif;
32+
font-family: sans-serif;
3333
font-size: 80px;
3434
font-weight: 700;
3535
color: #ffffff;

packages/studio/e2e/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig({
2727
name: "chromium",
2828
use: {
2929
...devices["Desktop Chrome"],
30-
launchOptions: { args: ["--force-color-profile=srgb"] },
30+
launchOptions: { args: ["--force-color-profile=srgb", "--font-render-hinting=none"] },
3131
},
3232
},
3333
],

packages/studio/e2e/studio-parity.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const PRISTINE_INDEX_HTML = `<!doctype html>
4747
top: 200px;
4848
left: 200px;
4949
margin: 0;
50-
font-family: Inter, sans-serif;
50+
font-family: sans-serif;
5151
font-size: 80px;
5252
font-weight: 700;
5353
color: #ffffff;

0 commit comments

Comments
 (0)