> For the complete documentation index, see [llms.txt](https://docs.rierino.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rierino.com/sdk-core-ui/foundations/typography.md). Agents can also search and read this documentation through its [MCP server](https://docs.rierino.com/~gitbook/mcp).

# Typography

The Rierino typeface, the named text styles and the size scale Core UI uses.

## Typeface

Rierino's typeface is **Montserrat**. Core UI's stylesheet loads it from Google Fonts and provides a `font-base` class that applies it.

Components **inherit** the font family from the page and don't set one themselves. Rierino apps set Montserrat on the page, so components use it there. In your own app, set it on `body` so that components and your own text match:

{% code title="globals.css" %}

```css
body {
  font-family: Montserrat, ui-sans-serif, system-ui, sans-serif;
}
```

{% endcode %}

Without this rule, components render in the system font from Tailwind's base reset.

{% hint style="warning" %}
**Load the weights you use**

`style.css` requests Montserrat at the regular weight (400) only. Text at 500, 600 or 700 is then drawn by the browser thickening the regular font (faux bold), which looks heavier and blurrier than the real weights. Load them yourself:

```html
<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap"
/>
```

In Next.js, `next/font/google` with `weight: ['400', '500', '600', '700']` does the same and hosts the files with your app.
{% endhint %}

## Text styles

Named text styles set the size, line height and weight together. Use them for headings, labels and captions that should match Rierino screens:

```jsx
<h2 className="text-bold-22">Order summary</h2>
<span className="text-medium-10 uppercase">Status</span>
```

The text style classes are **always included** in `style.css`, so they work everywhere: in your app without a Tailwind setup and in [hosted editors](https://docs.rierino.com/sdk-core-ui/guides/hosted-editors.md).

| Class                | Size | Line height | Weight |
| -------------------- | ---- | ----------- | ------ |
| `text-bold-28`       | 28px | 35px        | 700    |
| `text-bold-24`       | 24px | 30px        | 700    |
| `text-bold-22`       | 22px | 28px        | 700    |
| `text-bold-14`       | 14px | 18px        | 700    |
| `text-bold-13`       | 13px | 17px        | 700    |
| `text-bold-12`       | 12px | 15px        | 700    |
| `text-bold-10`       | 10px | 13px        | 700    |
| `text-semibold-12`   | 12px | 15px        | 600    |
| `text-semibold-8`    | 8px  | 10px        | 600    |
| `text-medium-12`     | 12px | 15px        | 500    |
| `text-medium-11`     | 11px | 14px        | 600    |
| `text-medium-zip-11` | 11px | 20px        | 500    |
| `text-medium-10`     | 10px | 13px        | 500    |
| `text-medium-8`      | 8px  | 10px        | 500    |
| `text-regular-22`    | 22px | 28px        | 500    |
| `text-regular-16`    | 16px | 20px        | 500    |
| `text-regular-14`    | 14px | 18px        | 500    |
| `text-regular-12`    | 12px | 15px        | 500    |
| `text-regular-11`    | 11px | 20px        | 500    |
| `text-regular-10`    | 10px | 12px        | 500    |

The name mostly tells you the weight: `bold` is 700, `semibold` 600 and `medium` 500. Two exceptions: `medium-11` is 600, and the `regular` styles are 500, not 400 as the name suggests.

## Size scale

Components size their text with this scale. From `base` (16px) upwards, each step is 1.25 times the one before (`lg` is the exception and keeps Tailwind's default). Below `base`, `sm` is one step down at `0.8rem`, and `xs` and `xxs` are fixed sizes.

| Class       | Size     | Pixels |
| ----------- | -------- | ------ |
| `text-xxs`  | 0.675rem | 10.8px |
| `text-xs`   | 0.75rem  | 12px   |
| `text-sm`   | 0.8rem   | 12.8px |
| `text-base` | 1rem     | 16px   |
| `text-lg`   | 1.125rem | 18px   |
| `text-xl`   | 1.25rem  | 20px   |
| `text-2xl`  | 1.563rem | 25px   |
| `text-3xl`  | 1.953rem | 31.2px |
| `text-4xl`  | 2.441rem | 39.1px |
| `text-5xl`  | 3.052rem | 48.8px |

Two things differ from Tailwind's defaults:

* `sm` is `0.8rem` (12.8px), not `0.875rem`.
* The classes set **font size only**, without a line height (again except `lg`). Line height comes from the element or its parent.

`style.css` contains only the size classes that components use, such as `text-sm` and `text-base`. To use the full scale in your own markup, add these values to your own Tailwind config, or write the sizes in CSS.

## Font variables in Rierino apps

Inside Rierino apps, each text style is also available as a `font` shorthand variable named `--fonts--<style>`:

```css
.Rie-Summary-title {
  font: var(--fonts--bold-22);
}
```

These variables are defined only inside the app's `#root` element, as with the [`--colors--` palette variables](https://docs.rierino.com/sdk-core-ui/foundations/colors.md#palette). Outside Rierino, use the text style classes.

The variables match the classes in size and line height, but two differ in weight:

| Style       | Class weight | Variable weight |
| ----------- | ------------ | --------------- |
| `regular-*` | 500          | 400             |
| `medium-11` | 600          | 500             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rierino.com/sdk-core-ui/foundations/typography.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
