All posts

Geist Serif as an npm package

Geist Serif is not on Google Fonts or Fontsource, so shadcn's font item cannot install it. Here is a package that can.

Audrey KlammerFontsshadcn

Geist Serif is Vercel's serif companion to Geist (Vercel's introduction, and the specimen page).

Geist Serif · Regular 400

Geist Serif.

Sphinx of black quartz, judge my vow.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

0123456789 & @ ! ? . , : ;

Live text in Geist Serif, with its default round dots.

I wanted it as the serif in 01orbital, and ran into a practical problem: shadcn's font item can only ask for a Google font (its schema). In a Next.js project it writes a next/font/google import, and everywhere else it imports a Fontsource package (the installer). Geist Serif is on neither Google Fonts nor Fontsource.

So I packaged it: @01orbital/font-geist-serif. A registry item can still declare any npm package and a CSS import, and that is how 01orbital's blocks bring the face in.

What is in it

The font files are copied unmodified from Vercel's own geist package, and the version number follows that package. They are licensed under the SIL Open Font License 1.1. The package is not affiliated with Vercel.

It is packaged the way Fontsource packages fonts, so it works anywhere a CSS import does.

Using it

npm install @01orbital/font-geist-serif
@import "@01orbital/font-geist-serif";

h1 {
  font-family: "Geist Serif", Georgia, "Times New Roman", serif;
}

With Tailwind v4, define a font token and use font-geist-serif:

@import "@01orbital/font-geist-serif";

@theme inline {
  --font-geist-serif: "Geist Serif", Georgia, "Times New Roman", serif;
}

What to know about the face

Geist Serif has one weight, 400, and no italic. If your site turns font synthesis off, serif text set bold or italic still draws upright at 400.

The variable file has an ELSH axis that changes the shape of the dots: round by default, then square, triangle and heart.

Round

i j . :

Square

i j . :

Triangle

i j . :

Heart

i j . :

The same characters with four ELSH settings: 0, 25, 50, and 100.
.playful {
  font-variation-settings: "ELSH" 100;
}

There is also @01orbital/font-geist-serif/static.css, the static Regular file with round dots.

It also has five stylistic sets, ss01 to ss05 (Vercel's specs), switched on the usual way:

.alternate {
  font-feature-settings: "ss01";
}

You can try each one on the specimen page.

If you are on Next.js

You can skip the package and use Vercel's loader:

import { GeistSerif } from "geist/font/serif"

Vercel's geist package is for Next.js only. Its Serif entry is a next/font/local call (its source), it lists next as a peer dependency, and its exports name only those loaders, so a Vite or Remix project can't import the font files from it.

This package is for everywhere else, and for registry items, which need a dependency they can declare and a CSS file they can import.