Skip to content

Commit

Permalink
Fix: 웹 폰트 설치
Browse files Browse the repository at this point in the history
어느 기기에서든 폰트 통일
  • Loading branch information
Lee JaeJun committed Jan 30, 2024
1 parent 6d3e2f9 commit 3632f33
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 11 deletions.
Binary file added src/fonts/Pretendard-Black.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-Bold.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-ExtraBold.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-ExtraLight.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-Light.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-Medium.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-Regular.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-SemiBold.woff
Binary file not shown.
Binary file added src/fonts/Pretendard-Thin.woff
Binary file not shown.
24 changes: 24 additions & 0 deletions src/styles/fonts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { css } from "@emotion/react";

import PretendardRegular from "../fonts/Pretendard-Regular.woff";
import PretendardBold from "../fonts/Pretendard-Bold.woff";

export const fonts = css`
@font-face {
font-family: Pretendard;
font-style: normal;
font-weight: normal;
src:
local("Pretendard"),
url(${PretendardRegular}) format("woff");
}
@font-face {
font-family: Pretendard;
font-style: normal;
font-weight: 500;
src:
local("Pretendard"),
url(${PretendardBold}) format("woff");
}
`;
61 changes: 50 additions & 11 deletions src/styles/globalStyles.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { css } from "@emotion/react";
import { fonts } from "./fonts";

const globalStyles = css`
* {
margin: 0px;
box-sizing: border-box;
}
${fonts}
::-webkit-scrollbar {
width: 8px;
Expand Down Expand Up @@ -43,7 +45,22 @@ const globalStyles = css`
textarea,
label,
table {
font-family: "Pretendard-Regular";
font-family:
"Pretendard Variable",
Pretendard,
-apple-system,
BlinkMacSystemFont,
system-ui,
Roboto,
"Helvetica Neue",
"Segoe UI",
"Apple SD Gothic Neo",
"Noto Sans KR",
"Malgun Gothic",
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
sans-serif;
margin: 0;
padding: 0;
border: 0;
Expand All @@ -63,23 +80,45 @@ const globalStyles = css`
list-style: none;
}
button {
font-family: "Pretendard-Regular";
font-family:
"Pretendard Variable",
Pretendard,
-apple-system,
BlinkMacSystemFont,
system-ui,
Roboto,
"Helvetica Neue",
"Segoe UI",
"Apple SD Gothic Neo",
"Noto Sans KR",
"Malgun Gothic",
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
sans-serif;
border: 0;
background: transparent;
cursor: pointer;
padding: 0;
margin: 0;
}
input {
font-family: "Pretendard-Regular";
}
@font-face {
font-family: "Pretendard-Regular";
src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff")
format("woff");
font-weight: 400;
font-style: normal;
font-family:
"Pretendard Variable",
Pretendard,
-apple-system,
BlinkMacSystemFont,
system-ui,
Roboto,
"Helvetica Neue",
"Segoe UI",
"Apple SD Gothic Neo",
"Noto Sans KR",
"Malgun Gothic",
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
sans-serif;
}
`;

Expand Down

0 comments on commit 3632f33

Please sign in to comment.