fix: Pretendard self-host + 한글 시스템 폰트 fallback 체인 강화
데모 환경에서 CDN(jsdelivr)·Google Fonts 차단된 망에서 Pretendard 가 로드되지 않아 명조체로 렌더링되는 문제 해결. - public/fonts/PretendardVariable.woff2 self-hosting (~2MB, weight 45-920) - @font-face 직접 정의 + <link rel="preload"> 로 첫 페인트 가속 - fallback 체인에 Apple SD Gothic Neo / Malgun Gothic / Noto Sans KR 추가 → 어떤 OS에서도 한글이 명조체로 떨어지지 않음 - 기존 jsdelivr CDN 은 백업 경로로 유지 (3중 안전망) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
105e8288e0
commit
7dff2b7244
3 files changed
+16
-2
No files matched your search
+12
-2
@@ -1,8 +1,18 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
/* Self-hosted Pretendard Variable — CDN/네트워크 차단 환경에서도 동일 렌더링 보장 */
|
||||
@font-face {
|
||||
font-family: 'Pretendard Variable';
|
||||
font-weight: 45 920;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: url('/fonts/PretendardVariable.woff2') format('woff2-variations');
|
||||
}
|
||||
|
||||
@theme {
|
||||
--font-sans: "Pretendard Variable", "Pretendard", "Inter", ui-sans-serif, system-ui, sans-serif;
|
||||
--font-serif: "Playfair Display", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
||||
/* fallback 체인: self-host Pretendard → CDN Pretendard → Inter → 한글 시스템 폰트 (Mac/Win/Android) → sans-serif */
|
||||
--font-sans: "Pretendard Variable", "Pretendard", "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", ui-sans-serif, system-ui, sans-serif;
|
||||
--font-serif: "Playfair Display", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
||||
|
||||
--color-primary-900: #0A1128; /* Dark Navy for text and buttons */
|
||||
--color-primary-800: #1A2B5E;
|
||||
|
||||
Reference in new issue
Block a user