testing with local font

This commit is contained in:
miloschwartz
2026-02-21 14:34:38 -08:00
parent 218a4893b6
commit f07f0092ad
21 changed files with 74 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import "./globals.css";
import { Geist, Inter, Manrope, Open_Sans } from "next/font/google";
import localFont from "next/font/local";
import { APP_FONT } from "./font-config";
import { ThemeProvider } from "@app/providers/ThemeProvider";
import EnvProvider from "@app/providers/EnvProvider";
import { pullEnv } from "@app/lib/pullEnv";
@@ -24,6 +25,7 @@ import { TanstackQueryProvider } from "@app/components/TanstackQueryProvider";
import { TailwindIndicator } from "@app/components/TailwindIndicator";
import { ViewportHeightFix } from "@app/components/ViewportHeightFix";
import StoreInternalRedirect from "@app/components/StoreInternalRedirect";
import { Inter } from "next/font/google";
export const metadata: Metadata = {
title: `Dashboard - ${process.env.BRANDING_APP_NAME || "Pangolin"}`,
@@ -32,10 +34,79 @@ export const metadata: Metadata = {
export const dynamic = "force-dynamic";
const font = Inter({
const ember = localFont({
src: [
{
path: "../../public/fonts/ember/AmazonEmber_Th.ttf",
weight: "100",
style: "normal"
},
{
path: "../../public/fonts/ember/AmazonEmber_ThIt.ttf",
weight: "100",
style: "italic"
},
{
path: "../../public/fonts/ember/AmazonEmber_Lt.ttf",
weight: "300",
style: "normal"
},
{
path: "../../public/fonts/ember/AmazonEmber_LtIt.ttf",
weight: "300",
style: "italic"
},
{
path: "../../public/fonts/ember/AmazonEmber_Rg.ttf",
weight: "400",
style: "normal"
},
{
path: "../../public/fonts/ember/AmazonEmber_RgIt.ttf",
weight: "400",
style: "italic"
},
{
path: "../../public/fonts/ember/Amazon-Ember-Medium.ttf",
weight: "500",
style: "normal"
},
{
path: "../../public/fonts/ember/Amazon-Ember-MediumItalic.ttf",
weight: "500",
style: "italic"
},
{
path: "../../public/fonts/ember/AmazonEmber_Bd.ttf",
weight: "700",
style: "normal"
},
{
path: "../../public/fonts/ember/AmazonEmber_BdIt.ttf",
weight: "700",
style: "italic"
},
{
path: "../../public/fonts/ember/AmazonEmber_He.ttf",
weight: "800",
style: "normal"
},
{
path: "../../public/fonts/ember/AmazonEmber_HeIt.ttf",
weight: "800",
style: "italic"
}
],
variable: "--font-ember",
display: "swap"
});
const inter = Inter({
subsets: ["latin"]
});
const fontClassName = inter.className;
export default async function RootLayout({
children
}: Readonly<{
@@ -79,7 +150,7 @@ export default async function RootLayout({
return (
<html suppressHydrationWarning lang={locale}>
<body className={`${font.className} h-screen-safe overflow-hidden`}>
<body className={`${fontClassName} h-screen-safe overflow-hidden`}>
<StoreInternalRedirect />
<TopLoader />
{build === "saas" && (