# Fonts

Defining fonts is as easy as defining colors or spacings, just use `fonts` property in config:

```typescript
export const shopstoryConfig = {
  //...
  fonts: [
    {
      id: 'body',
      label: 'Body',
      value: {
        fontSize: 20,
        lineHeight: 1.8,
        fontFamily: 'sans-serif'
      },
      mapTo: "$body"
    },
    {
      id: 'body-small',
      label: 'Body small',
      value: {
        fontSize: 13,
        lineHeight: 1.8,
        fontFamily: 'sans-serif'
      },
      mapTo: "$body2"
    },
    {
      id: 'heading1',
      label: 'Heading 1',
      value: {
        fontFamily: 'serif',
        fontSize: 48,
        lineHeight: 1.2,
        fontWeight: 700,
        '@sm': {
          fontSize: 36 // override font size from sm and xs
        }
      },
      mapTo: "$heading1"
    },
    {
      id: 'heading2',
      label: 'Heading 2',
      value: {
        fontFamily: 'serif',
        fontSize: 36,
        lineHeight: 1.2,
        fontWeight: 700,
        '@sm': {
          fontSize: 24 // override font size from sm and xs
        }
      },
      mapTo: "$heading2"
    },
    
  ],
}
```

As you can see fonts are just objects with CSS properties. You can make font sizes or line heights responsive with `@{breakpoint}` notation.&#x20;

## Master tokens

Below we're showing master tokens for fonts:

<table><thead><tr><th width="225">Token</th><th>Description</th></tr></thead><tbody><tr><td><code>$body</code></td><td>Main body text font</td></tr><tr><td><code>$body.bold</code></td><td>Bold main body.</td></tr><tr><td><code>$body2</code></td><td>Smaller body text font.</td></tr><tr><td><code>$body2.bold</code></td><td>Bold small body.</td></tr><tr><td><code>$heading1</code></td><td>Heading 1 (biggest)</td></tr><tr><td><code>$heading2</code></td><td>Heading 2</td></tr><tr><td><code>$heading3</code></td><td>Heading 3</td></tr><tr><td><code>$heading4</code></td><td>Heading 4 (smallest)</td></tr></tbody></table>

If you only have 1 body text or 2 headings then remember that you can map one of your custom tokens to multiple Shopstory master tokens. For example, if you have only 1 body style without bold you can map it to all of the Shopstory body font tokens.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shopstory.app/design-tokens/fonts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
