Skip to content

Commit

Permalink
feat(fe): apply pretendard font (#1523)
Browse files Browse the repository at this point in the history
* feat(fe): apply pretendard font

* feat: enable turbopack
  • Loading branch information
dotoleeoak authored Feb 28, 2024
1 parent dce86cd commit 49088fa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
Binary file added frontend-client/app/PretendardVariable.woff2
Binary file not shown.
23 changes: 8 additions & 15 deletions frontend-client/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ import { Toaster } from '@/components/ui/sonner'
import { metaBaseUrl } from '@/lib/constants'
import { cn } from '@/lib/utils'
import type { Metadata, Viewport } from 'next'
import { Manrope, Noto_Sans_KR, Ubuntu_Mono } from 'next/font/google'
import { Ubuntu_Mono } from 'next/font/google'
import localFont from 'next/font/local'
import './globals.css'

// TODO: 추후에 페이지 별로 revalidate 시간 논의 및 조정 필요
export const revalidate = 5

const noto = Noto_Sans_KR({
subsets: ['latin'],
weight: ['400', '600'],
variable: '--font-noto'
})

const manrope = Manrope({
subsets: ['latin'],
weight: ['400', '500', '600', '700'],
variable: '--font-manrope'
const pretendard = localFont({
src: './PretendardVariable.woff2',
display: 'swap',
weight: '45 920',
variable: '--font-pretendard'
})

const mono = Ubuntu_Mono({
Expand Down Expand Up @@ -46,10 +42,7 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
<html
lang="en"
className={cn(noto.variable, manrope.variable, mono.variable)}
>
<html lang="en" className={cn(pretendard.variable, mono.variable)}>
<body>
{children}
<Toaster
Expand Down
3 changes: 2 additions & 1 deletion frontend-client/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const { withSentryConfig } = require('@sentry/nextjs')
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
typedRoutes: true
typedRoutes: true,
turbo: true
},
output: 'standalone',
env: {
Expand Down
6 changes: 1 addition & 5 deletions frontend-client/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ export default {
editor: '3rem minmax(0, 1fr)'
},
fontFamily: {
sans: [
'var(--font-manrope)',
'var(--font-noto)',
...defaultTheme.fontFamily.sans
],
sans: ['--font-pretendard', ...defaultTheme.fontFamily.sans],
mono: ['var(--font-mono)', ...defaultTheme.fontFamily.mono]
},
colors: {
Expand Down

0 comments on commit 49088fa

Please sign in to comment.