๐Ÿ’ป My Work/๐ŸŽจ Material Design

[Material Design] Material-UI(MUI)๋กœ react & styled component ์‚ฌ์šฉํ•˜๊ธฐ <font>

Jaeseo Kim 2022. 9. 14. 23:58

๋ฉ”ํ…Œ๋ฆฌ์–ผ ๋””์ž์ธ์˜ ๊ธฐ๋ณธ ํฐํŠธ๋Š” Roboto ์ž…๋‹ˆ๋‹ค.

์ด๋Š” ์˜๋ฌธ ์ „์šฉ ํฐํŠธ์ด๊ธฐ ๋•Œ๋ฌธ์—, ๋”ฐ๋กœ ํ•œ๊ตญ์–ด ๊ธฐ๋ณธ ํฐํŠธ๋ฅผ ์ง€์ •ํ•ด์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค.

https://fonts.google.com/specimen/Roboto

 

Google Fonts: Roboto

Roboto has a dual nature. It has a mechanical skeleton and the forms are largely geometric. At the same time, the font features friendly and open curves. While

fonts.google.com

 

00. ํ•œ๊ตญ๊ณ„ Roboto ๊ธฐ๋ณธ ํฐํŠธ


https://fonts.google.com/noto/specimen/Noto+Sans+KR 

 

Google Fonts: Noto Sans Korean

Noto is a global font collection for writing in all modern and ancient languages. Noto Sans KR is an unmodulated (“sans serif”) design for the Korean language u

fonts.google.com

ํ•œ๊ตญ์–ด ์ง€์› ๊ธฐ๋ณธ ํฐํŠธ๋Š” Noto Sans KR ์ž…๋‹ˆ๋‹ค.

 

01. ํฐํŠธ ์ง€์ •


์ €๋Š” src/css/font.css ์— ํฐํŠธ๋“ค์„ ์ง€์ •ํ•ด์คฌ์Šต๋‹ˆ๋‹ค.

์ด ์ค‘, Noto Sans KR ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

@font-face {
  font-family: "Noto Sans KR";
  font-style: normal;
  font-display: swap;
  src: url(https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap)
    format("woff2");
}

 

 

02. ํฐํŠธ ํ…Œ๋งˆ์— ์ ์šฉ


ํ˜„์žฌ Roboto๋กœ ์ง€์ •๋˜์–ด ์žˆ๋Š” ๊ธฐ๋ณธ ํฐํŠธ๋ฅผ NotoSans KR ๋กœ ์ง€์ •ํ•ด์ค๋‹ˆ๋‹ค.

let theme = createTheme({

...

  typography: {
    fontFamily: "Noto Sans KR",
  },
  
...
  
});

https://mui.com/material-ui/customization/typography/

 

Typography - Material UI

The theme provides a set of type sizes that work well together, and also with the layout grid.

mui.com

 

๐Ÿ“Œ ๋ฐ˜์‘ํ˜•์„ ์œ„ํ•œ, font ํฌ๊ธฐ์— ๋Œ€ํ•ด ๊ธฐ์ˆ ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.