index.ts53 lines · main
1import { Source_Code_Pro } from 'next/font/google'
2import localFont from 'next/font/local'
3
4export const customFont = localFont({
5 variable: '--font-custom',
6 display: 'swap',
7 fallback: ['Circular', 'custom-font', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'],
8 src: [
9 {
10 path: './CustomFont-Book.woff2',
11 weight: '400',
12 style: 'normal',
13 },
14 {
15 path: './CustomFont-BookItalic.woff2',
16 weight: '400',
17 style: 'italic',
18 },
19 {
20 path: './CustomFont-Medium.woff2',
21 weight: '500',
22 style: 'normal',
23 },
24 {
25 path: './CustomFont-Bold.woff2',
26 weight: '700',
27 style: 'normal',
28 },
29 {
30 path: './CustomFont-BoldItalic.woff2',
31 weight: '700',
32 style: 'italic',
33 },
34 {
35 path: './CustomFont-Black.woff2',
36 weight: '800',
37 style: 'normal',
38 },
39 {
40 path: './CustomFont-BlackItalic.woff2',
41 weight: '800',
42 style: 'italic',
43 },
44 ],
45})
46
47export const sourceCodePro = Source_Code_Pro({
48 subsets: ['latin'],
49 fallback: ['Source Code Pro', 'Office Code Pro', 'Menlo', 'monospace'],
50 variable: '--font-source-code-pro',
51 display: 'swap',
52 weight: ['400', '500', '600', '700'],
53})