Repository navigation
[fix] Storybook에서 Pretendard 폰트를 앱과 같이 불러온다 - #2275
Conversation
- 앱은 index.html의 CDN 링크로 Pretendard를 불러오는데 Storybook에는 preview-head.html이 없어 모든 스토리가 대체 폰트로 그려졌다 - 같은 링크를 preview-head.html에 둔다
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @seongwon030's task in 27s —— View job harry 리뷰리뷰 기준에 어긋나는 부분은 없어요. |
🎨 UI 변경사항을 확인해주세요
166개 스토리 변경 · 전체 193개 스토리 · 67개 컴포넌트 |
Close #2273
문제
Storybook의 모든 스토리가 Pretendard가 아닌 대체 폰트로 그려지고 있었다. 앱은
index.html의 jsdelivr CDN 링크로 Pretendard를 불러오는데,.storybook/에는preview-head.html이 없고Global.styles.ts에도@font-face가 없다. 그래서 Pretendard가 설치되지 않은 PC와 Chromatic 스냅샷은font-family의 다음 후보로 그려졌다. #2268 리뷰에서 harry가 짚었다.해결
.storybook/preview-head.html에index.html과 같은preconnect와 Pretendard 스타일시트 링크를 둔다. Krona One은 관리자 로그인 제목 전용이라 넣지 않았다.검증
정적 빌드를 Playwright로 열고 CDP
CSS.getPlatformFontsForNode로Button스토리 버튼 글자의 실제 렌더 폰트를 확인했다(Pretendard 미설치 macOS).develop-fe)Apple SD Gothic NeoPretendard SemiBoldbuild-storybook통과. Chromatic 환경에서의 결과는 이 PR의 Chromatic 빌드로 확인한다.영향 범위
Storybook과 Chromatic baseline만 바뀐다. 앱 번들·학생용·관리자용·앱 웹뷰에는 닿지 않는다.