목록웹폰트 (1)
우당탕탕 기술블로그
[React] input에 입력할 때 글자 깜빡임 현상, 웹폰트 성능 최적화
✏️ 문제 상황 useState 혹은 useRef를 사용해도 input 창에 텍스트를 빠르게 타이핑하면 깜빡임 현상이 발생했다. 🧐 문제 원인 타이핑할 때마다 폰트를 요청하고 있어서 발생한 문제였다. @import url(//fonts.googleapis.com/earlyaccess/notosanskr.css); *, body { font-family: 'Noto Sans KR', sans-serif; } 😊 해결 방안 src/assets/fonts 폴더를 만들어서 사용할 폰트(woff2, woff, otf)를 직접 다운받아서 적용했다. /* src/assets/font.module.scss */ @font-face { font-family: 'Noto Sans KR'; font-style: normal..
Web
2023. 6. 18. 14:48