feat(site,skill): lock domain materiality, localize dark-instrument showcases, and curate tier-1 Korean fonts

This commit is contained in:
Yun Chan 2026-10-31 22:23:25 +09:00
parent 36835dd8a3
commit 008e29752e
44 changed files with 544 additions and 417 deletions

View file

@ -2,78 +2,66 @@
생성: `node tools/similarity.mjs` · 임계 0.78 · 분포 상한 40% · 재작업 엄격 대상: lumina-optics, pulsegate, synapse-bci
결과: 실패 0 · 경고 15
결과: 실패 0 · 경고 3
## 지문
| 쇼케이스 | 한글 본문 | 한글 표제 | 배경 | 배경 L·C·h | 강조 hue | radius | 모노 |
|---|---|---|---|---|---|---|---|
| baekje-celadon | Pretendard | MaruBuri | #121514 어두움·무채 | 6·1·173 | #8fbcaa (167°) | 2 (1–3px) | — |
| cask-archive | Pretendard | MaruBuri | #0b0b0d 어두움·무채 | 3·1·290 | #d99b38 (76°) | 2 (1–3px) | 사용 |
| cheongon-care | Pretendard | Pretendard | #f8faf9 밝음·무채 | 98·1·164 | #0f766e (187°) | 2 (1–3px) | 사용 |
| dure-enrollment | IBM Plex Sans KR | Noto Serif KR | #fafafa 밝음·무채 | 98·0·297 | #c2410c (47°) | 6 (4–8px) | 사용 |
| font-foundry | Pretendard | MaruBuri | #f5f1e8 밝음·웜/쿨 기운 | 95·5·92 | #a63d2f (36°) | 2 (1–3px) | — |
| form-architecture | Pretendard | Pretendard | #fdfdfb 밝음·무채 | 99·1·110 | — | — (미상) | — |
| gaon-lms | Pretendard | Noto Serif KR | #fafafa 밝음·무채 | 98·0·297 | #059669 (162°) | 6 (4–8px) | 사용 |
| griddle-club | Pretendard | Pretendard | #f4f1e9 밝음·웜/쿨 기운 | 95·4·95 | #2147e7 (299°) | 10 (9–16px) | 사용 |
| hannam-jari | Pretendard | Pretendard | #f8f7f3 밝음·무채 | 97·2·100 | #9d3f34 (35°) | 6.4 (4–8px) | 사용 |
| hyang-incense | Pretendard | MaruBuri | #f6f2e9 밝음·웜/쿨 기운 | 96·5·92 | #7c3b24 (46°) | 2 (1–3px) | — |
| lumina-optics | IBM Plex Sans KR | IBM Plex Sans KR | #101214 어두움·무채 | 5·1·258 | #bfe8ee (212°) | 0 (0) | 사용 |
| materia-interior | Pretendard | MaruBuri | #f5f3ef 밝음·무채 | 96·2·91 | #76583d (67°) | 2 (1–3px) | 사용 |
| muwol-coffee | Pretendard | MaruBuri | #f4f4f0 밝음·무채 | 96·2·110 | #7a3e1d (53°) | 2 (1–3px) | 사용 |
| orbit-aerospace | Pretendard | Pretendard | #081018 어두움·웜/쿨 기운 | 4·6·264 | #d08a5a (59°) | 2 (1–3px) | 사용 |
| overtone-sound | Pretendard | Pretendard | #12100e 어두움·무채 | 5·1·73 | #efad4b (76°) | 0 (0) | 사용 |
| pulsegate | Pretendard | Pretendard | #0b0e12 어두움·무채 | 4·2·267 | #6ca3ee (274°) | 4 (4–8px) | 사용 |
| rfs-cfd | Pretendard | Pretendard | #f4f5f3 밝음·무채 | 96·1·129 | #2a6b8a (246°) | 0 (0) | 사용 |
| saebyeok-cheonggwa | Pretendard | Pretendard | #fbfaf7 밝음·무채 | 98·2·97 | #1f3f6b (278°) | 0 (0) | 사용 |
| synapse-bci | IBM Plex Sans KR | IBM Plex Sans KR | #08090b 어두움·무채 | 2·1·271 | #d9a441 (80°) | 2 (1–3px) | 사용 |
| thursday-flowers | Pretendard | MaruBuri | #f8f6f0 밝음·웜/쿨 기운 | 97·3·97 | #7c4a3f (38°) | 0 (0) | — |
| twentyoz-corp | Pretendard | Pretendard | #e9e7e2 밝음·무채 | 92·3·94 | #b9362b (36°) | 0 (0) | — |
| 쇼케이스 | 한글 본문 | 한글 표제 | 배경 | 배경 L·C·h | 강조 hue | radius | 모노 | 주역 매체 | 표제 스케일 |
|---|---|---|---|---|---|---|---|---|---|
| baekje-celadon | Pretendard | MaruBuri | #121514 어두움·무채 | 6·1·173 | #8fbcaa (167°) | 2 (1–3px) | — | photo-editorial | poster (58px) |
| cask-archive | SUIT | Noto Serif KR | #0b0b0d 어두움·무채 | 3·1·290 | #d99b38 (76°) | 2 (1–3px) | 사용 | workbench-app | poster (61px) |
| cheongon-care | Spoqa Han Sans Neo | Spoqa Han Sans Neo | #f8faf9 밝음·무채 | 98·1·164 | #0f766e (187°) | 2 (1–3px) | 사용 | workbench-app | poster (61px) |
| dure-enrollment | IBM Plex Sans KR | Noto Serif KR | #fafafa 밝음·무채 | 98·0·297 | #c2410c (47°) | 6 (4–8px) | 사용 | workbench-app | editorial (30px) |
| font-foundry | Pretendard | MaruBuri | #f5f1e8 밝음·웜/쿨 기운 | 95·5·92 | #a63d2f (36°) | 2 (1–3px) | — | photo-editorial | poster (60px) |
| form-architecture | Pretendard | Pretendard | #fdfdfb 밝음·무채 | 99·1·110 | — | — (미상) | — | photo-editorial | poster (88px) |
| gaon-lms | Pretendard | Noto Serif KR | #fafafa 밝음·무채 | 98·0·297 | #059669 (162°) | 6 (4–8px) | 사용 | workbench-app | editorial (30px) |
| griddle-club | Pretendard | Pretendard | #f4f1e9 밝음·웜/쿨 기운 | 95·4·95 | #2147e7 (299°) | 10 (9–16px) | 사용 | photo-editorial | poster (80px) |
| hannam-jari | Pretendard | Pretendard | #f8f7f3 밝음·무채 | 97·2·100 | #9d3f34 (35°) | 6.4 (4–8px) | 사용 | photo-editorial | poster (67px) |
| hyang-incense | SUIT | Gowun Batang | #f6f2e9 밝음·웜/쿨 기운 | 96·5·92 | #7c3b24 (46°) | 2 (1–3px) | — | photo-editorial | poster (60px) |
| lumina-optics | SUIT | SUIT | #101214 어두움·무채 | 5·1·258 | #bfe8ee (212°) | 0 (0) | 사용 | webgl-3d | poster (58px) |
| materia-interior | Wanted Sans | Iropke Batang | #f5f3ef 밝음·무채 | 96·2·91 | #76583d (67°) | 2 (1–3px) | 사용 | photo-editorial | poster (61px) |
| muwol-coffee | Wanted Sans | Noto Serif KR | #f4f4f0 밝음·무채 | 96·2·110 | #7a3e1d (53°) | 2 (1–3px) | 사용 | photo-editorial | editorial (52px) |
| orbit-aerospace | Wanted Sans | Wanted Sans | #081018 어두움·웜/쿨 기운 | 4·6·264 | #d08a5a (59°) | 2 (1–3px) | 사용 | photo-editorial | poster (54px) |
| overtone-sound | SUIT | Hahmlet | #12100e 어두움·무채 | 5·1·73 | #efad4b (76°) | 0 (0) | 사용 | canvas-2d | editorial (40px) |
| pulsegate | Wanted Sans | Wanted Sans | #0b0e12 어두움·무채 | 4·2·267 | #6ca3ee (274°) | 4 (4–8px) | 사용 | svg-instrument | editorial (52px) |
| rfs-cfd | IBM Plex Sans KR | IBM Plex Sans KR | #f4f5f3 밝음·무채 | 96·1·129 | #2a6b8a (246°) | 0 (0) | 사용 | webgl-3d | poster (72px) |
| saebyeok-cheonggwa | Spoqa Han Sans Neo | Spoqa Han Sans Neo | #fbfaf7 밝음·무채 | 98·2·97 | #1f3f6b (278°) | 0 (0) | 사용 | photo-editorial | poster (72px) |
| synapse-bci | IBM Plex Sans KR | Noto Serif KR | #08090b 어두움·무채 | 2·1·271 | #d9a441 (80°) | 2 (1–3px) | 사용 | canvas-2d | editorial (48px) |
| thursday-flowers | SUIT | MaruBuri | #f8f6f0 밝음·웜/쿨 기운 | 97·3·97 | #7c4a3f (38°) | 0 (0) | — | photo-editorial | poster (56px) |
| twentyoz-corp | Pretendard | Pretendard | #e9e7e2 밝음·무채 | 92·3·94 | #b9362b (36°) | 0 (0) | — | canvas-2d | poster (72px) |
## 분포
| 축 | 최빈값 | 점유 | 상한 초과 | 전체 |
|---|---|---|---|---|
| 한글 본문 서체 | Pretendard | 18/21 (86%) | **초과** | Pretendard 18, IBM Plex Sans KR 3 |
| 한글 표제 서체 | Pretendard | 10/21 (48%) | **초과** | Pretendard 10, MaruBuri 7, Noto Serif KR 2, IBM Plex Sans KR 2 |
| 한글 본문 서체 | Pretendard | 7/21 (33%) | — | Pretendard 7, SUIT 5, Wanted Sans 4, IBM Plex Sans KR 3, Spoqa Han Sans Neo 2 |
| 한글 표제 서체 | Noto Serif KR | 5/21 (24%) | — | Noto Serif KR 5, Pretendard 4, MaruBuri 3, Spoqa Han Sans Neo 2, Wanted Sans 2, Gowun Batang 1, SUIT 1, Iropke Batang 1, Hahmlet 1, IBM Plex Sans KR 1 |
| 배경 명도·채도 | 밝음·무채 | 10/21 (48%) | **초과** | 밝음·무채 10, 어두움·무채 6, 밝음·웜/쿨 기운 4, 어두움·웜/쿨 기운 1 |
| radius 구간 | 1–3px | 9/21 (43%) | **초과** | 1–3px 9, 0 6, 4–8px 4, 미상 1, 9–16px 1 |
| 모노 사용 | 사용 | 15/21 (71%) | **초과** | 사용 15, 미사용 6 |
## 유사도 상위 15쌍
| 쌍 | 점수 | 본문 | 표제 | 배경 | 강조 | radius | 모노 |
|---|---|---|---|---|---|---|---|
| font-foundry ↔ hyang-incense | 0.96 | 1 | 1 | 0.97 | 0.80 | 1 | 1 |
| materia-interior ↔ muwol-coffee | 0.96 | 1 | 1 | 1.00 | 0.72 | 1 | 1 |
| rfs-cfd ↔ saebyeok-cheonggwa | 0.89 | 1 | 1 | 0.92 | 0.36 | 1 | 1 |
| font-foundry ↔ thursday-flowers | 0.87 | 1 | 1 | 0.88 | 0.96 | 0 | 1 |
| hyang-incense ↔ thursday-flowers | 0.85 | 1 | 1 | 0.89 | 0.84 | 0 | 1 |
| hyang-incense ↔ muwol-coffee | 0.85 | 1 | 1 | 0.85 | 0.86 | 1 | 0 |
| font-foundry ↔ muwol-coffee | 0.82 | 1 | 1 | 0.85 | 0.66 | 1 | 0 |
| griddle-club ↔ saebyeok-cheonggwa | 0.81 | 1 | 1 | 0.86 | 0.58 | 0 | 1 |
| hyang-incense ↔ materia-interior | 0.81 | 1 | 1 | 0.85 | 0.58 | 1 | 0 |
| orbit-aerospace ↔ overtone-sound | 0.80 | 1 | 1 | 0.75 | 0.66 | 0 | 1 |
| font-foundry ↔ materia-interior | 0.78 | 1 | 1 | 0.85 | 0.38 | 1 | 0 |
| cask-archive ↔ materia-interior | 0.77 | 1 | 1 | 0.00 | 0.82 | 1 | 1 |
| hannam-jari ↔ twentyoz-corp | 0.76 | 1 | 1 | 0.83 | 0.98 | 0 | 0 |
| thursday-flowers ↔ twentyoz-corp | 0.76 | 1 | 0 | 0.83 | 0.96 | 1 | 1 |
| hannam-jari ↔ saebyeok-cheonggwa | 0.74 | 1 | 1 | 0.97 | 0.00 | 0 | 1 |
| 쌍 | 점수 | 본문 | 표제 | 배경 | 강조 | radius | 모노 | 매체 | 스케일 |
|---|---|---|---|---|---|---|---|---|---|
| griddle-club ↔ hannam-jari | 0.78 | 1 | 1 | 0.88 | 0.00 | 0 | 1 | 1 | 1 |
| materia-interior ↔ muwol-coffee | 0.73 | 1 | 0 | 1.00 | 0.72 | 1 | 1 | 1 | 0 |
| hyang-incense ↔ thursday-flowers | 0.72 | 1 | 0 | 0.89 | 0.84 | 0 | 1 | 1 | 1 |
| hannam-jari ↔ twentyoz-corp | 0.71 | 1 | 1 | 0.83 | 0.98 | 0 | 0 | 0 | 1 |
| form-architecture ↔ hannam-jari | 0.70 | 1 | 1 | 0.92 | 0.00 | 0 | 0 | 1 | 1 |
| baekje-celadon ↔ font-foundry | 0.70 | 1 | 1 | 0.00 | 0.00 | 1 | 1 | 1 | 1 |
| font-foundry ↔ thursday-flowers | 0.69 | 0 | 1 | 0.88 | 0.96 | 0 | 1 | 1 | 1 |
| cheongon-care ↔ saebyeok-cheonggwa | 0.69 | 1 | 1 | 0.95 | 0.00 | 0 | 1 | 0 | 1 |
| form-architecture ↔ griddle-club | 0.68 | 1 | 1 | 0.80 | 0.00 | 0 | 0 | 1 | 1 |
| dure-enrollment ↔ gaon-lms | 0.68 | 0 | 1 | 1.00 | 0.00 | 1 | 1 | 1 | 1 |
| form-architecture ↔ twentyoz-corp | 0.65 | 1 | 1 | 0.75 | 0.00 | 0 | 1 | 0 | 1 |
| font-foundry ↔ hannam-jari | 0.65 | 1 | 0 | 0.84 | 0.98 | 0 | 0 | 1 | 1 |
| materia-interior ↔ orbit-aerospace | 0.64 | 1 | 0 | 0.00 | 0.84 | 1 | 1 | 1 | 1 |
| font-foundry ↔ twentyoz-corp | 0.63 | 1 | 0 | 0.86 | 1.00 | 0 | 1 | 0 | 1 |
| font-foundry ↔ hyang-incense | 0.61 | 0 | 0 | 0.97 | 0.80 | 1 | 1 | 1 | 1 |
## 경고
- font-foundry ↔ hyang-incense 유사도 0.96 ≥ 0.78 (겹친 축: body·display·background·accent·radius·mono)
- materia-interior ↔ muwol-coffee 유사도 0.96 ≥ 0.78 (겹친 축: body·display·background·radius·mono)
- rfs-cfd ↔ saebyeok-cheonggwa 유사도 0.89 ≥ 0.78 (겹친 축: body·display·background·radius·mono)
- font-foundry ↔ thursday-flowers 유사도 0.87 ≥ 0.78 (겹친 축: body·display·background·accent·mono)
- hyang-incense ↔ thursday-flowers 유사도 0.85 ≥ 0.78 (겹친 축: body·display·background·accent·mono)
- hyang-incense ↔ muwol-coffee 유사도 0.85 ≥ 0.78 (겹친 축: body·display·background·accent·radius)
- font-foundry ↔ muwol-coffee 유사도 0.82 ≥ 0.78 (겹친 축: body·display·background·radius)
- griddle-club ↔ saebyeok-cheonggwa 유사도 0.81 ≥ 0.78 (겹친 축: body·display·background·mono)
- hyang-incense ↔ materia-interior 유사도 0.81 ≥ 0.78 (겹친 축: body·display·background·radius)
- orbit-aerospace ↔ overtone-sound 유사도 0.80 ≥ 0.78 (겹친 축: body·display·mono)
- 한글 본문 서체 편중 — 'Pretendard' 18/21 (86%) > 40%
- 한글 표제 서체 편중 — 'Pretendard' 10/21 (48%) > 40%
- 배경 명도·채도 편중 — '밝음·무채' 10/21 (48%) > 40%
- radius 구간 편중 — '1–3px' 9/21 (43%) > 40%
- 모노 사용 편중 — '사용' 15/21 (71%) > 40%

View file

@ -7,18 +7,27 @@
// 스킬이 약속한 "다른 클라이언트의 것과 혼동될 수 없다"는 페이지 간 비교로만
// 검증된다. 이 검사가 그 비교를 한다.
//
// 지문 축 (각 public/work/<slug>/styles/*.css 정적 분석, var() 재귀 해석):
// 지문 축 (각 public/work/<slug>/styles/*.css + index.html 정적 분석, var() 재귀 해석):
// 1. 한글 본문 서체 — body/--font-body 스택에서 첫 한글 지원 서체
// 2. 한글 표제 서체 — h1/--font-display 스택에서 첫 한글 지원 서체
// 3. 배경 — body/--surface 계열 색의 CIELAB 명도·채도·색상
// 4. 강조색 hue — --accent 계열(무채색이면 다음 후보)
// 5. radius 구간 — --radius 또는 최빈 border-radius
// 6. 모노 사용 — 규칙에서 모노 스택을 실제로 쓰는가
// 7. 주역 매체(medium) — webgl-3d / canvas-2d / svg-instrument / workbench-app / photo-editorial / typographic
// 8. 표제 스케일(scale) — h1/--step-display 최대 크기 구간(compact / editorial / poster)
//
// 왜 7·8축과 2군 서체 감시를 추가했는가(실측 사고 2026-10-06):
// CSS 토큰 6축만 측정하자 지표를 통과하려고 19개 쇼케이스에 유아·예능·전단용 디스플레이 서체
// (Bagel Fat One, Gasoek One, Jua, Do Hyeon, Black Han Sans)를 강제 할당하고 정작 히어로 시각물과
// 표제 스케일은 평탄화하는 퇴행(Goodhart's Law)이 발생했다. 구조·매체와 스케일 대비를 지문에 포함하고,
// 허용 목록(allowedNoveltyDisplay)에 없는 2군 장르 잠금 서체 사용은 즉시 FAIL 처리한다.
//
// 판정:
// - 쌍별 유사도(0~1)가 threshold 이상이면 수렴 쌍. 기본은 WARN.
// config.strict 에 든 쇼케이스(재작업 대상)가 낀 쌍은 FAIL.
// - 분포 편중: 한 값이 전체의 maxShare 를 넘으면 WARN (distributionMode: "fail" 이면 FAIL).
// - 2군 장르 잠금 서체 오용: allowedNoveltyDisplay 에 없는 쇼케이스가 쓰면 FAIL.
//
// 사용: node tools/similarity.mjs [--config=similarity.config.json] [--json]
// 결과: tools/similarity-report.md 에 표를 남긴다.
@ -38,8 +47,18 @@ const defaults = {
maxShare: 0.4,
distributionMode: "warn",
strict: [],
allowedNoveltyDisplay: [],
ignore: [],
weights: { body: 0.25, display: 0.2, background: 0.2, accent: 0.15, radius: 0.1, mono: 0.1 },
weights: {
body: 0.2,
display: 0.16,
background: 0.18,
accent: 0.12,
radius: 0.08,
mono: 0.08,
medium: 0.1,
scale: 0.08,
},
};
const config = fs.existsSync(configPath)
? { ...defaults, ...JSON.parse(fs.readFileSync(configPath, "utf8")) }
@ -96,6 +115,16 @@ const KOREAN_FONTS = new Map(
],
);
const MONO_RE = /\b(mono|monospace|consolas|courier|menlo|sfmono|coding)\b/i;
// 2군 장르 잠금 디스플레이 서체 — 유아·키즈·아케이드·특가 프로모션 외 신뢰·학술·계측·편집 도메인에 오용하면
// 즉시 품격이 붕괴한다(실측 사고 2026-10-06). allowedNoveltyDisplay 에 명시된 경우만 허용한다.
const DISALLOWED_NOVELTY_DISPLAY = new Set([
"Gasoek One",
"Bagel Fat One",
"Jua",
"Do Hyeon",
"Black Han Sans",
"Dongle",
]);
/* ── CSS 파싱 ── */
function stripComments(css) {
@ -143,6 +172,12 @@ function readShowcase(slug) {
return css;
}
function readShowcaseHtml(slug) {
const htmlPath = path.join(workRoot, slug, "index.html");
if (!fs.existsSync(htmlPath)) return "";
return fs.readFileSync(htmlPath, "utf8");
}
/** :root·html 에서 처음 정의된 값을 쓴다. 다크 모드 재정의는 기본 지문이 아니다. */
function collectVars(rules) {
const vars = new Map();
@ -266,6 +301,39 @@ function radiusBucket(px) {
return "pill";
}
function parseMaxSizePx(raw) {
if (!raw) return null;
const s = String(raw).trim();
const clampMatch = s.match(/clamp\s*\(([^)]+)\)/i);
if (clampMatch) {
const parts = clampMatch[1].split(",").map((p) => p.trim());
return toPx(parts[parts.length - 1]);
}
return toPx(s);
}
function scaleBucket(px) {
if (px == null) return "editorial";
if (px <= 28) return "compact";
if (px <= 52) return "editorial";
return "poster";
}
function detectMedium(html = "") {
if (!html) return "typographic";
if (/\b(webgl2?|gl\.createProgram|THREE\.|three\.module)/i.test(html)) return "webgl-3d";
if (/<canvas\b/i.test(html)) return "canvas-2d";
if ((html.match(/<svg\b/gi) || []).length >= 2 && /<input\b[^>]*type=["']range["']|role=["']slider["']|data-scenario|data-region/i.test(html)) {
return "svg-instrument";
}
if (/<table\b/i.test(html) && /<dialog\b|role=["']tablist["']|data-tab|type=["']search["']/i.test(html)) {
return "workbench-app";
}
if (/<img\b|<picture\b/i.test(html)) return "photo-editorial";
if ((html.match(/<svg\b/gi) || []).length >= 2) return "svg-instrument";
return "typographic";
}
/* ── 지문 추출 ── */
function firstDecl(rules, selectorRe, prop) {
for (const r of rules) {
@ -281,7 +349,7 @@ function firstVar(vars, names) {
return null;
}
export function fingerprint(slug, css) {
export function fingerprint(slug, css, html = "") {
const rules = rulesOf(css);
const vars = collectVars(rules);
const res = (v) => resolve(v, vars);
@ -355,6 +423,15 @@ export function fingerprint(slug, css) {
}
}
const h1SizeRaw = res(
firstDecl(rules, /(^|[\s,>])h1(\b|$)/, "font-size") ||
firstVar(vars, ["--step-display", "--step-hero", "--step-4", "--step-3", "--text-display"])?.value ||
"",
);
const h1Px = parseMaxSizePx(h1SizeRaw);
const scale = scaleBucket(h1Px);
const medium = detectMedium(html);
const bg = bgRgb ? lch(bgRgb) : null;
return {
slug,
@ -366,6 +443,9 @@ export function fingerprint(slug, css) {
radiusPx,
radius: radiusBucket(radiusPx),
mono,
medium,
scale,
h1Px: h1Px != null ? Math.round(h1Px) : null,
};
}
@ -394,6 +474,8 @@ export function similarity(a, b, weights = defaults.weights) {
else parts.accent = !a.accent && !b.accent ? 1 : 0;
parts.radius = a.radius === b.radius ? 1 : 0;
parts.mono = a.mono === b.mono ? 1 : 0;
parts.medium = a.medium && b.medium ? (a.medium === b.medium ? 1 : 0) : 0;
parts.scale = a.scale && b.scale ? (a.scale === b.scale ? 1 : 0) : 0;
let score = 0;
let total = 0;
for (const [k, w] of Object.entries(weights)) {
@ -415,10 +497,12 @@ function main() {
for (const slug of slugs) {
const css = readShowcase(slug);
if (css == null) continue;
prints.push(fingerprint(slug, css));
const html = readShowcaseHtml(slug);
prints.push(fingerprint(slug, css, html));
}
const strict = new Set(config.strict);
const allowedNovelty = new Set(config.allowedNoveltyDisplay || []);
const pairs = [];
for (let i = 0; i < prints.length; i++) {
for (let j = i + 1; j < prints.length; j++) {
@ -431,6 +515,16 @@ function main() {
const failures = [];
const warnings = [];
let pass = 0;
for (const f of prints) {
if (DISALLOWED_NOVELTY_DISPLAY.has(f.display) && !allowedNovelty.has(f.slug)) {
failures.push(
`2군 장르 잠금 서체 오용 — ${f.slug}: '${f.display}' (신뢰·학술·계측·편집 도메인에 유아·예능·전단 서체 사용 금지)`,
);
} else {
pass++;
}
}
for (const p of pairs) {
if (p.score < config.threshold) {
pass++;
@ -496,11 +590,11 @@ function writeReport(prints, pairs, distribution, warnings, failures) {
``,
`## 지문`,
``,
`| 쇼케이스 | 한글 본문 | 한글 표제 | 배경 | 배경 L·C·h | 강조 hue | radius | 모노 |`,
`|---|---|---|---|---|---|---|---|`,
`| 쇼케이스 | 한글 본문 | 한글 표제 | 배경 | 배경 L·C·h | 강조 hue | radius | 모노 | 주역 매체 | 표제 스케일 |`,
`|---|---|---|---|---|---|---|---|---|---|`,
...prints.map(
(f) =>
`| ${f.slug} | ${f.body} | ${f.display} | ${f.bg?.hex ?? "—"} ${f.bgClass} | ${f.bg ? `${f.bg.L}·${f.bg.C}·${f.bg.h}` : "—"} | ${f.accent ? `${f.accent.hex} (${f.accent.h}°)` : "—"} | ${f.radiusPx ?? "—"} (${f.radius}) | ${f.mono ? "사용" : "—"} |`,
`| ${f.slug} | ${f.body} | ${f.display} | ${f.bg?.hex ?? "—"} ${f.bgClass} | ${f.bg ? `${f.bg.L}·${f.bg.C}·${f.bg.h}` : "—"} | ${f.accent ? `${f.accent.hex} (${f.accent.h}°)` : "—"} | ${f.radiusPx ?? "—"} (${f.radius}) | ${f.mono ? "사용" : "—"} | ${f.medium} | ${f.scale}${f.h1Px ? ` (${f.h1Px}px)` : ""} |`,
),
``,
`## 분포`,
@ -511,11 +605,11 @@ function writeReport(prints, pairs, distribution, warnings, failures) {
``,
`## 유사도 상위 15쌍`,
``,
`| 쌍 | 점수 | 본문 | 표제 | 배경 | 강조 | radius | 모노 |`,
`|---|---|---|---|---|---|---|---|`,
`| 쌍 | 점수 | 본문 | 표제 | 배경 | 강조 | radius | 모노 | 매체 | 스케일 |`,
`|---|---|---|---|---|---|---|---|---|---|`,
...pairs.slice(0, 15).map(
(p) =>
`| ${p.a} ↔ ${p.b} | ${p.score.toFixed(2)} | ${p.parts.body} | ${p.parts.display} | ${p.parts.background.toFixed(2)} | ${p.parts.accent.toFixed(2)} | ${p.parts.radius} | ${p.parts.mono} |`,
`| ${p.a} ↔ ${p.b} | ${p.score.toFixed(2)} | ${p.parts.body} | ${p.parts.display} | ${p.parts.background.toFixed(2)} | ${p.parts.accent.toFixed(2)} | ${p.parts.radius} | ${p.parts.mono} | ${p.parts.medium ?? 0} | ${p.parts.scale ?? 0} |`,
),
``,
...(warnings.length ? [`## 경고`, ``, ...warnings.map((w) => `- ${w}`), ``] : []),