-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from 2wheeh/font
[#120] Set default font
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Noto_Sans_KR as NotoSansKr } from 'next/font/google'; | ||
|
||
// next/font fetches the font files on build time | ||
// i.e. '.next/static/media/**.woff2' | ||
// but supports preloading only for the subsets. | ||
// Not preloaded font files are loaded on browser later | ||
// than html. | ||
export const notoSansKr = NotoSansKr({ | ||
// 'korean' subset is not supported | ||
subsets: ['latin'], | ||
// While loading, we don't show the text with | ||
// fallback font til 3s at most (FOIT) | ||
// instead of showing ugly font changing (FOUT). | ||
display: 'block', | ||
adjustFontFallback: true, | ||
}); |