---
title: "font"
description: "The two font token types, grouped because they share a prefix."
url: "https://pitlane.tools/package/theme/schema/variable/font"
---

# font

```ts
import { font } from "@pitlane/theme/schema";
```

```ts
font: object;
```

The two font token types, grouped because they share a prefix.

`font.family()` accepts a font stack, as a string or an array of names; an array joins with commas and quotes what needs quoting. `font.weight()` accepts 1 to 1000 or one of DTCG's nineteen keywords, and emits the number.

## Type Declaration

### family()

```ts
family(): TokenSchema<"fontFamily">;
```

A `fontFamily` token: a font stack as a string, or an array of names joined with commas.

#### Returns

[`TokenSchema`](https://pitlane.tools/package/theme/schema/interface/TokenSchema.md)\<`"fontFamily"`>

### weight()

```ts
weight(): TokenSchema<"fontWeight">;
```

A `fontWeight` token: 1 to 1000 or a DTCG weight keyword, emitted as the number.

#### Returns

[`TokenSchema`](https://pitlane.tools/package/theme/schema/interface/TokenSchema.md)\<`"fontWeight"`>

## Example

```ts
let schema = { font: s.font.family(), weight: s.font.weight() };
let tokens = { font: { sans: ["Inter var", "system-ui"] }, weight: { bold: 700 } };
```
