Closed Septa2112 closed 1 year ago
@Septa2112
It looks like the import of Inter from "next/font/google" has failed, and you can use a local method next/font/local
to import the Inter font. You may need to find the font you want to use, such asInter-latin
, from https://fonts.googleapis.com/css2?family=Inter:wght@400&display=swap.
You will need to download the .woff2
file from the url, https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2, copy it to the directory calcom-docker/calcom/apps/web/fonts
and rename it to Inter-Latin.woff2
. Then, you will need to import the interFont
locally in the your app.
The code you need to modify is as follows:
// calcom-docker/calcom/apps/web/pages/_app.tsx
// import { Inter } from "next/font/google";
import localFont from "next/font/local";
// replace it with local method
// const interFont = Inter({ subsets: ["latin"], variable: "--font-inter", preload: true, display: "swap" });
const interFont = localFont({
src: "../fonts/Inter-Latin.woff2",
variable: "--font-inter",
preload: true,
display: "swap",
});
@chenyuyang2022 Thanks a lot! I will try.
this may have also been fixed more recently than your clone, as the nightly build doesn't show this issue. thanks for reporting!
Hi, I follow the steps of advanced user in readme, but build failed when I execute
docker-compose up -d
to build cal.com.