๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • What would life be If we had no courage to attemp anything?
Development/React.js

[React] font ์ ์šฉ

by DevIseo 2023. 1. 28.

๋ฐฉ๋ฒ•

1. ํ•„์š”ํ•œ ํฐํŠธ ๋‹ค์šด๋กœ๋“œ

Pretendard

๋‚˜์˜ ๊ฒฝ์šฐ font ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด woff2 format์„ ์„ ํƒํ•จ

2. React ํ”„๋กœ์ ํŠธ์— ํฐํŠธ ๋ณต์‚ฌ

3. ํฐํŠธ ์ ์šฉ

@font-face {
  font-family: "PretendardVariable";
  src: local("PretendardVariable"),url("/src/assets/fonts/PretendardVariable.woff2") format("woff2");
}

Reference

React ํฐํŠธ ๋ณ€๊ฒฝ ๋ฐฉ๋ฒ•

 

'Development > React.js' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

npm ERR! Cannot read properties of null (reading 'edgesOut')  (0) 2023.05.14
[React] console.log(useRef)  (0) 2023.01.25
[React] ref, useRef  (0) 2023.01.24
[React] port ๋ฒˆํ˜ธ ๋ณ€๊ฒฝํ•˜๊ธฐ  (0) 2023.01.23
[React] React Hook API  (0) 2023.01.18

๋Œ“๊ธ€