index.ts 1.2 KB

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