Skip to content

Commit 5f0294f

Browse files
authored
Merge pull request #267 from modern-agile-team/modify/change_font/#265
폰트 적용방식 변경2
2 parents fc6d078 + 81c7087 commit 5f0294f

12 files changed

+64
-7
lines changed

src/components/common/Seo.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export default function Seo() {
77
rel="icon"
88
href="https://menbosha-s3.s3.ap-northeast-2.amazonaws.com/public/mainpage/titleLogo.svg"
99
/>
10+
<link
11+
rel="stylesheet"
12+
type="text/css"
13+
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css"
14+
/>
1015
<title>멘보샤</title>
1116
<meta
1217
name="naver-site-verification"

src/pages/_app.tsx

+55-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,56 @@ import MSWProvider from '@/components/common/MSWProvider';
66
import { SocketProvider } from '@/hooks/useSocket';
77
import Seo from '@/components/common/Seo';
88
import ScrollToTopButton from '@/components/common/scroll-to-top/ScrollToTopButton';
9+
import localFont from 'next/font/local';
10+
const pretendard = localFont({
11+
src: [
12+
{
13+
path: './fonts/Pretendard-Black.woff2',
14+
weight: '900',
15+
style: 'normal',
16+
},
17+
{
18+
path: './fonts/Pretendard-ExtraBold.woff2',
19+
weight: '800',
20+
style: 'normal',
21+
},
22+
{
23+
path: './fonts/Pretendard-Bold.woff2',
24+
weight: '700',
25+
style: 'normal',
26+
},
27+
{
28+
path: './fonts/Pretendard-SemiBold.woff2',
29+
weight: '600',
30+
style: 'normal',
31+
},
32+
{
33+
path: './fonts/Pretendard-Medium.woff2',
34+
weight: '500',
35+
style: 'normal',
36+
},
37+
{
38+
path: './fonts/Pretendard-Regular.woff2',
39+
weight: '400',
40+
style: 'normal',
41+
},
42+
{
43+
path: './fonts/Pretendard-Light.woff2',
44+
weight: '300',
45+
style: 'normal',
46+
},
47+
{
48+
path: './fonts/Pretendard-ExtraLight.woff2',
49+
weight: '200',
50+
style: 'normal',
51+
},
52+
{
53+
path: './fonts/Pretendard-Thin.woff2',
54+
weight: '100',
55+
style: 'normal',
56+
},
57+
],
58+
});
959

1060
export default function App({ Component, pageProps }: AppProps) {
1161
const [isClient, setIsClient] = useState(false);
@@ -20,9 +70,11 @@ export default function App({ Component, pageProps }: AppProps) {
2070
<React.Suspense fallback={<div>Loading...</div>}>
2171
{isClient && (
2272
<MSWProvider>
23-
<Seo />
24-
<Component {...pageProps} />
25-
<ScrollToTopButton />
73+
<main className={pretendard.className}>
74+
<Seo />
75+
<Component {...pageProps} />
76+
<ScrollToTopButton />
77+
</main>
2678
</MSWProvider>
2779
)}
2880
</React.Suspense>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/styles/globals.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body {
1414
font-size: 24px;
1515
scroll-behavior: smooth;
1616
}
17-
17+
/*
1818
@font-face {
1919
font-family: 'Pretendard', sans-serif;
2020
src: url('/public/fonts/Pretendard-Black.woff2') format('woff2');
@@ -77,11 +77,11 @@ body {
7777
font-weight: 100;
7878
font-style: normal;
7979
font-display: swap;
80-
}
80+
} */
8181

82-
* {
82+
/* * {
8383
font-family: 'Pretendard', sans-serif;
84-
}
84+
} */
8585

8686
/* react-quill에 대한 스타일 지정 */
8787
.ql-editor {

0 commit comments

Comments
 (0)