improve font performance

This commit is contained in:
AykutSarac 2023-01-28 17:45:51 +03:00
parent 39c5284ae7
commit f85fd10b8e
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,8 @@ import styled, { DefaultTheme } from "styled-components";
const robotoMono = Roboto_Mono({
weight: "500",
subsets: ["latin"],
display: "auto"
display: "swap",
fallback: ["Arial, Helvetica, sans-serif", "Tahoma, Verdana, sans-serif"]
});
function getTypeColor(value: string, theme: DefaultTheme) {

View File

@ -14,7 +14,8 @@ import { ThemeProvider } from "styled-components";
const monaSans = localFont({
src: "./Mona-Sans.woff2",
variable: "--mona-sans",
display: "auto",
display: "swap",
fallback: ["Arial, Helvetica, sans-serif", "Tahoma, Verdana, sans-serif"]
});
if (process.env.NODE_ENV !== "development") {