diff --git a/docs/styling/design-system-platform.md b/docs/styling/design-system-platform.md
index 0f25b452..3f091efa 100644
--- a/docs/styling/design-system-platform.md
+++ b/docs/styling/design-system-platform.md
@@ -635,7 +635,7 @@ Form과 overlay는 다음 story를 추가한다.
필수 안정화:
-- 동일한 Linux image, browser version, font
+- 동일한 browser version과 글꼴(`tests/visual/fonts.conf`, Linux 전용)
- animation과 caret 비활성화
- 시간·랜덤·network 응답 고정
- 동적 ID와 민감 데이터 mask
diff --git a/docs/testing/frontend-platform-testing-strategy.md b/docs/testing/frontend-platform-testing-strategy.md
index 921906d1..0e53b1df 100644
--- a/docs/testing/frontend-platform-testing-strategy.md
+++ b/docs/testing/frontend-platform-testing-strategy.md
@@ -933,7 +933,10 @@ Playwright `toHaveScreenshot()`을 사용한다.
결정성 규칙:
-- OS, browser, font, device scale을 CI image로 고정
+- browser 버전과 viewport·scale은 `playwright.visual.config.ts`로, 글꼴은
+ `tests/visual/fonts.conf`로 고정(Linux 전용). 러너에는
+ `fonts-noto-core fonts-noto-cjk fonts-noto-cjk-extra fonts-liberation`
+ 패키지가 필요하고, 없으면 `visual-fonts` 검사가 설치 명령을 보여 주며 실패한다
- animation/caret 비활성화
- clock/random/network fixture 고정
- 개인정보와 동적 ID mask
diff --git a/playwright.visual.config.ts b/playwright.visual.config.ts
index 36528303..4fe52334 100644
--- a/playwright.visual.config.ts
+++ b/playwright.visual.config.ts
@@ -1,3 +1,5 @@
+import { fileURLToPath } from "node:url";
+
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
@@ -27,6 +29,17 @@ export default defineConfig({
colorScheme: "light",
locale: "en-US",
trace: "retain-on-failure",
+ launchOptions: {
+ // 11-02. Chromium sees only the fonts the goldens were captured with,
+ // whatever the host or an outer FONTCONFIG_FILE says. The
+ // `visual-fonts` project checks them before any screenshot.
+ env: {
+ ...process.env,
+ FONTCONFIG_FILE: fileURLToPath(
+ new URL("./tests/visual/fonts.conf", import.meta.url),
+ ),
+ },
+ },
},
webServer: {
command:
@@ -34,5 +47,8 @@ export default defineConfig({
url: "http://127.0.0.1:4174",
reuseExistingServer: false,
},
- projects: [{ name: "chromium-visual" }],
+ projects: [
+ { name: "visual-fonts", testMatch: /fonts\.setup\.ts$/ },
+ { name: "chromium-visual", dependencies: ["visual-fonts"] },
+ ],
});
diff --git a/tests/visual/fonts.conf b/tests/visual/fonts.conf
new file mode 100644
index 00000000..c2f1f11d
--- /dev/null
+++ b/tests/visual/fonts.conf
@@ -0,0 +1,37 @@
+
+
+
+
Clean Architecture Frontend
+플랫폼구성화면상태
+플랫폼구성화면상태
+const value = 42;`;
+ document.body.append(probes);
+ });
+
+ const cdp = await page.context().newCDPSession(page);
+ await cdp.send("DOM.enable");
+ await cdp.send("CSS.enable");
+ const { root } = await cdp.send("DOM.getDocument");
+ const drawn: Record