add: Replace web fonts with local fonts
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import type { Metadata, Viewport } from "next"
|
import type { Metadata, Viewport } from "next"
|
||||||
import "katex/dist/katex.min.css"
|
import "katex/dist/katex.min.css"
|
||||||
import "./globals.css"
|
import "./globals.css"
|
||||||
import { JetBrains_Mono } from "next/font/google"
|
import localFont from "next/font/local"
|
||||||
import { NextIntlClientProvider } from "next-intl"
|
import { NextIntlClientProvider } from "next-intl"
|
||||||
import { AppI18nProvider } from "@/components/i18n-provider"
|
import { AppI18nProvider } from "@/components/i18n-provider"
|
||||||
import { getMessagesForLocale } from "@/i18n/messages"
|
import { getMessagesForLocale } from "@/i18n/messages"
|
||||||
@@ -12,8 +12,12 @@ import { APPEARANCE_INIT_SCRIPT } from "@/lib/appearance-script"
|
|||||||
import { AppearanceProvider } from "@/components/appearance-provider"
|
import { AppearanceProvider } from "@/components/appearance-provider"
|
||||||
import { OverlayScrollbarsInit } from "@/components/overlay-scrollbars-init"
|
import { OverlayScrollbarsInit } from "@/components/overlay-scrollbars-init"
|
||||||
|
|
||||||
const jetbrainsMono = JetBrains_Mono({
|
const sourceCodePro = localFont({
|
||||||
subsets: ["latin"],
|
src: [
|
||||||
|
{ path: "../../src/fonts/SourceCodePro-Regular.ttf", weight: "400", style: "normal" },
|
||||||
|
{ path: "../../src/fonts/SourceCodePro-Medium.ttf", weight: "500", style: "normal" },
|
||||||
|
{ path: "../../src/fonts/SourceCodePro-Black.ttf", weight: "900", style: "normal" },
|
||||||
|
],
|
||||||
variable: "--font-sans",
|
variable: "--font-sans",
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -47,7 +51,7 @@ export default async function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html
|
<html
|
||||||
lang={initialLocale}
|
lang={initialLocale}
|
||||||
className={jetbrainsMono.variable}
|
className={sourceCodePro.variable}
|
||||||
suppressHydrationWarning
|
suppressHydrationWarning
|
||||||
>
|
>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
BIN
src/fonts/SourceCodePro-Black.ttf
Normal file
BIN
src/fonts/SourceCodePro-Black.ttf
Normal file
Binary file not shown.
BIN
src/fonts/SourceCodePro-Medium.ttf
Normal file
BIN
src/fonts/SourceCodePro-Medium.ttf
Normal file
Binary file not shown.
BIN
src/fonts/SourceCodePro-Regular.ttf
Normal file
BIN
src/fonts/SourceCodePro-Regular.ttf
Normal file
Binary file not shown.
Reference in New Issue
Block a user