Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0dd8583
docs(typography): recommend official font builds in the typography gu…
rmnturov Oct 27, 2026
32388b9
docs(typography): recommend npm font packages and explain CDN subsett…
rmnturov Oct 27, 2026
dbee184
docs(typography): link the npm font packages (#DS-5791)
rmnturov Oct 27, 2026
3265347
docs(typography): shorten the npm font packages note (#DS-5791)
rmnturov Oct 27, 2026
82fd2a5
docs(typography): add @fontsource/jetbrains-mono to the npm sources (…
rmnturov Oct 27, 2026
d8c72a8
docs(typography): explain why the fontsource mono subsets are enough …
rmnturov Oct 27, 2026
39e00d8
docs(typography): fix the mono wording (#DS-5791)
rmnturov Oct 27, 2026
ef007f8
docs(typography): install JetBrains Mono from fontsource instead of s…
rmnturov Oct 28, 2026
8eca3d8
docs(typography): recommend the inter-ui package and warn about its t…
rmnturov Oct 28, 2026
6f82cf5
docs(typography): list Inter before JetBrains Mono in the weights tab…
rmnturov Oct 28, 2026
1804e18
docs(typography): list the italic weight the tokens actually use (#DS…
rmnturov Oct 28, 2026
f436427
docs(typography): collapse the fonts table to one row per family (#DS…
rmnturov Oct 28, 2026
94f6fa8
docs(typography): drop the mono subsets note (#DS-5791)
rmnturov Oct 28, 2026
6d3cb01
docs(typography): split the article into package and manual installat…
rmnturov Oct 28, 2026
f00c222
docs(typography): trim the font check paragraph (#DS-5791)
rmnturov Oct 28, 2026
71bb474
docs(typography): describe text styles and font overrides (#DS-5791)
rmnturov Oct 28, 2026
34f079d
docs(typography): shorten the text styles section (#DS-5791)
rmnturov Oct 28, 2026
b6fc92c
docs(typography): drop the JetBrains releases note (#DS-5791)
rmnturov Oct 28, 2026
3625441
docs(typography): drop the packages-are-full claim (#DS-5791)
rmnturov Oct 28, 2026
5f4c02b
docs(typography): rename the CDN section (#DS-5791)
rmnturov Oct 28, 2026
d06ff87
chore(cspell): allow the self-hosting term (#DS-5791)
rmnturov Oct 28, 2026
9e25561
docs(typography): describe the trimmed Google Fonts build in plain wo…
rmnturov Oct 28, 2026
a60a14f
docs(typography): replace the imperatives with impersonal wording and…
rmnturov Oct 28, 2026
eac10e1
docs(typography): drop the generic lead paragraph (#DS-5791)
rmnturov Oct 28, 2026
bcc9622
docs(typography): split the text styles paragraph in two (#DS-5791)
rmnturov Oct 28, 2026
a77651d
docs(typography): link the class list in the design tokens (#DS-5791)
rmnturov Oct 28, 2026
13a10bb
docs(typography): reword the text styles section, link the theming gu…
rmnturov Oct 28, 2026
507fed1
docs(typography): reword the text styles section, link the theming gu…
rmnturov Oct 28, 2026
8f222a6
docs(typography): reword the page lead (#DS-5791)
rmnturov Oct 28, 2026
cd4c0d2
docs(typography): explain the classes through the token variables (#D…
rmnturov Oct 28, 2026
638c316
docs(typography): drop the agent from the classes sentence (#DS-5791)
rmnturov Oct 28, 2026
9093211
docs(typography): say the class uses the token variables (#DS-5791)
rmnturov Oct 28, 2026
6e40e99
docs(typography): bring back the classes link and the prefer-classes …
rmnturov Oct 28, 2026
bd9929f
docs(typography): call inter-ui a package (#DS-5791)
rmnturov Oct 28, 2026
860862e
docs(typography): call inter-ui a package and set it in bold (#DS-5791)
rmnturov Oct 28, 2026
afc85b7
docs(typography): keep prepositions inside the links (#DS-5791)
rmnturov Oct 28, 2026
4ace78b
docs(typography): drop the comments from the import snippet (#DS-5791)
rmnturov Oct 28, 2026
5056f19
docs(typography): keep only the inter-latin.css warning (#DS-5791)
rmnturov Oct 28, 2026
5822547
docs(typography): call the archive file a stylesheet (#DS-5791)
rmnturov Oct 28, 2026
fa7e1f2
docs(typography): say the classes are listed in the tokens (#DS-5791)
rmnturov Oct 28, 2026
39c3bb4
docs(typography): rename the last section to checking the files (#DS-…
rmnturov Oct 28, 2026
b53e06e
docs(typography): say inter-latin.css is not used (#DS-5791)
rmnturov Oct 28, 2026
8cfa6be
docs(typography): separate the code blocks and praise the full inter.…
rmnturov Oct 28, 2026
d4d7077
docs(typography): spell out the override condition (#DS-5791)
rmnturov Oct 28, 2026
c6b8c32
docs(typography): state the override condition in prose and link the …
rmnturov Oct 28, 2026
41a43b5
docs(typography): drop indefinite-personal turns and the direct addre…
rmnturov Oct 28, 2026
29ea10d
docs(typography): call self-hosting a hosting of one's own (#DS-5791)
rmnturov Oct 28, 2026
5290b0c
docs(typography): name the fontsource package in the same words as in…
rmnturov Oct 28, 2026
e84844a
docs(typography): keep the override condition to its one rule (#DS-5791)
rmnturov Oct 28, 2026
946412e
docs(typography): set unicode-range as plain text (#DS-5791)
rmnturov Oct 28, 2026
f2f7946
docs(typography): drop the есть verb and the doubled mixin word (#DS-…
rmnturov Oct 28, 2026
cccc7e6
docs(typography): bold the unicode-range term (#DS-5791)
rmnturov Oct 28, 2026
8d78495
docs(typography): keep prepositions inside the links (#DS-5791)
rmnturov Oct 28, 2026
1e03a2e
docs(typography): fix the heading and wording by the style guide (#DS…
rmnturov Oct 28, 2026
cd7963c
docs(typography): describe the font file by its feature set (#DS-5791)
rmnturov Oct 28, 2026
789b6d3
docs(typography): replace the colloquial token wording (#DS-5791)
rmnturov Oct 28, 2026
291a37d
docs(typography): name the npm packages once (#DS-5791)
rmnturov Oct 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/docs/src/app/seo-descriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ export const DOCS_SEO_DESCRIPTIONS = {
"ru": "Tree Select позволяет искать и выбирать одно или несколько значений из иерархических данных с сохранением структуры дерева."
},
"typography": {
"en": "Koobiq typography defines the fonts, weights, and text styles used to create a consistent visual hierarchy in interfaces.",
"ru": "Типографика Koobiq определяет шрифты, начертания и текстовые стили для создания единообразной визуальной иерархии в интерфейсах."
"en": "Connecting fonts, how the sources differ and how to override the typography styles.",
"ru": "Подключение шрифтов, чем отличаются источники и как переопределить стили типографики."
},
"username": {
"en": "The pattern is used when the interface refers to an internal user.",
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/src/app/structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ const structure: DocsStructure = makeStructure({
},
svgPreview: 'typography',
hasApi: false,
hasExamples: false
hasExamples: false,
isUpdated: expiresAt('2026-11-10')
},
{
id: DocsStructureItemId.DesignTokens,
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Rules for code that uses Koobiq:
- [Versioning](https://koobiq.io/en/main/versioning.md): Our releases follow the versioning described in the [Semver spec](http://semver.org/).
- [Theming](https://koobiq.io/en/main/theming.md): A theme in Koobiq is a set of CSS variables.
- [Localization](https://koobiq.io/en/main/localization.md): Koobiq components render some strings of their own — the filters menu of the filter bar, the tooltips of the code block, the accessible names of every icon-only button, the placeholder of a datepicker, and so on.
- [Typography](https://koobiq.io/en/main/typography.md): Koobiq typography defines the fonts, weights, and text styles used to create a consistent visual hierarchy in interfaces.
- [Typography](https://koobiq.io/en/main/typography.md): Where to get the Inter and JetBrains Mono fonts, how the sources differ and how to override the fonts in the interface.
- [Design tokens](https://koobiq.io/en/main/design-tokens.md): The global CSS custom properties (`--kbq-*`) of the themes: colors, typography, shadows, border radius and sizes.
- [Schematics](https://koobiq.io/en/main/schematics.md): As part of the **Koobiq** design system, a set of **schematics** is provided — CLI tools designed to automate library installation, perform migrations, and update components in Angular projects.
- [Upgrade guide](https://koobiq.io/en/main/migration.md): New versions include improvements but also contain **breaking changes**; they must be applied step by step.
Expand Down
85 changes: 49 additions & 36 deletions packages/components/core/styles/typography/typography.en.mdx
Original file line number Diff line number Diff line change
@@ -1,60 +1,73 @@
Koobiq typography defines the fonts, weights, and text styles used to create a consistent visual hierarchy in interfaces.
Connecting fonts, how the sources differ and how to override the typography styles.

### Installing Fonts
### Connecting Fonts

Koobiq uses the [Inter](https://github.com/rsms/inter) and [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) font by default.
Koobiq uses the [Inter](https://github.com/rsms/inter) and [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) fonts by default.

| Font | Weight | Style |
| -------------- | ------ | ------ |
| JetBrains Mono | 400 | Normal |
| JetBrains Mono | 600 | Normal |
| JetBrains Mono | 700 | Normal |
| Inter | 400 | Normal |
| Inter | 400 | Italic |
| Inter | 500 | Normal |
| Inter | 500 | Italic |
| Inter | 600 | Normal |
| Inter | 700 | Normal |
| Font | Weights |
| -------------- | ---------------------------------------- |
| Inter | 400, 500, 600, 700; italic — 400 and 600 |
| JetBrains Mono | 400, 600, 700 |

Add it to your application via [Fontsource](#fontsource), or with the [Google Fonts CDN](#google-fonts-cdn).
Fonts come from npm packages or are wired up by hand — from files and a CDN link.

#### Fontsource
#### Packages

Install packages:
Both fonts are installed from npm packages: [inter-ui](https://www.npmjs.com/package/inter-ui) and [@fontsource/jetbrains-mono](https://www.npmjs.com/package/@fontsource/jetbrains-mono).

```bash
npm install @fontsource/inter @fontsource/jetbrains-mono
npm install inter-ui @fontsource/jetbrains-mono
```

Then you add the following code inside your global styles:
The **inter-ui** package ships `inter.css`, which has the full font feature set — Cyrillic, popular special symbols and the slashed zero. `inter-latin.css` is not used: it has neither Cyrillic nor some of the features.

```scss
// Inter
@import '@fontsource/inter/400.css';
@import '@fontsource/inter/500.css';
@import '@fontsource/inter/600.css';
@import '@fontsource/inter/700.css';
@import '@fontsource/inter/400-italic.css';
@import '@fontsource/inter/500-italic.css';

// JetBrains Mono
@import 'inter-ui/inter.css';

@import '@fontsource/jetbrains-mono/400.css';
@import '@fontsource/jetbrains-mono/600.css';
@import '@fontsource/jetbrains-mono/700.css';
```

#### Google Fonts CDN
#### A CDN and self-hosting

Google Fonts does not work for Inter: it serves the font trimmed — without some of the popular symbols and without the features the Koobiq tokens declare, so, for example, the slashed zero does not appear. Inter comes [as files from rsms.me](https://rsms.me/inter/download/), where the archive ships a ready-made stylesheet.

```scss
@import 'assets/fonts/inter/inter.css';
```

Add the following code inside your `<head>` tag:
JetBrains Mono can be linked from Google Fonts:

```html
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<!-- Inter -->
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap"
rel="stylesheet"
/>
<!-- JetBrains Mono -->
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap" rel="stylesheet" />
```

#### Text styles

A ready-made class uses the separate design token variables: font family, size, line height, letter spacing, weight, text transform and OpenType features. Every class is listed [in the design tokens](/en/main/design-tokens/typography).

The ready-made classes are used in development rather than custom styles assembled from individual variables: the design token variables are there for partial customization. The classes come [with the theme](/en/main/theming/overview), and when it is built from SCSS mixins, `koobiq-typography()` adds them.

```html
<h2 class="kbq-headline">Heading</h2>
<p class="kbq-text-normal">Interface text</p>
```

#### Changing the fonts

The font families are set by global variables, and overriding them changes the fonts across the interface. The override goes after the tokens are connected, otherwise the value from the tokens applies.

```scss
:root {
--kbq-font-family-base: 'MySans', sans-serif;
--kbq-font-family-accent: 'MyDisplay', 'MySans', sans-serif;
--kbq-font-family-mono: 'MyMono', monospace;
}
```

#### Checking the files

A font from any source is checked before installing: it has to contain the characters the interface uses and the OpenType features Koobiq enables. Serving by **unicode-range** — which is what CDNs and the subsets built from them do, Inter in Fontsource for example — drops the features along with the glyphs.
83 changes: 48 additions & 35 deletions packages/components/core/styles/typography/typography.ru.mdx
Original file line number Diff line number Diff line change
@@ -1,60 +1,73 @@
Типографика Koobiq определяет шрифты, начертания и текстовые стили для создания единообразной визуальной иерархии в интерфейсах.
Подключение шрифтов, чем отличаются источники и как переопределить стили типографики.

### Добавление шрифтов
### Подключение шрифтов

Koobiq по умолчанию использует шрифты [Inter](https://github.com/rsms/inter) и [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono).

| Шрифт | Жирность | Стиль |
| -------------- | -------- | ------- |
| JetBrains Mono | 400 | Обычный |
| JetBrains Mono | 600 | Обычный |
| JetBrains Mono | 700 | Обычный |
| Inter | 400 | Обычный |
| Inter | 400 | Курсив |
| Inter | 500 | Обычный |
| Inter | 500 | Курсив |
| Inter | 600 | Обычный |
| Inter | 700 | Обычный |
| Шрифт | Начертания |
| -------------- | -------------------------------------- |
| Inter | 400, 500, 600, 700; курсив — 400 и 600 |
| JetBrains Mono | 400, 600, 700 |

Добавьте их в ваше приложение при помощи [Fontsource](#fontsource) или [Google Fonts CDN](#google-fonts-cdn).
Шрифты подключаются из npm-пакетов или вручную — файлами и ссылкой с CDN.

#### Fontsource
#### Пакеты

Установите пакеты:
Оба шрифта устанавливаются из npm-пакетов: [inter-ui](https://www.npmjs.com/package/inter-ui) и [@fontsource/jetbrains-mono](https://www.npmjs.com/package/@fontsource/jetbrains-mono).

```bash
npm install @fontsource/inter @fontsource/jetbrains-mono
npm install inter-ui @fontsource/jetbrains-mono
```

Затем добавьте следующий код в ваши глобальные стили:
Из пакета **inter-ui** подходит `inter.css`: в нем полный набор возможностей шрифта — кириллица, популярные спецсимволы и перечеркнутый ноль. Сборка `inter-latin.css` не используется: в ней нет ни кириллицы, ни части фич.

```scss
// Inter
@import '@fontsource/inter/400.css';
@import '@fontsource/inter/500.css';
@import '@fontsource/inter/600.css';
@import '@fontsource/inter/700.css';
@import '@fontsource/inter/400-italic.css';
@import '@fontsource/inter/500-italic.css';

// JetBrains Mono
@import 'inter-ui/inter.css';

@import '@fontsource/jetbrains-mono/400.css';
@import '@fontsource/jetbrains-mono/600.css';
@import '@fontsource/jetbrains-mono/700.css';
```

#### Google Fonts CDN
#### CDN и собственный хостинг

Google Fonts для Inter не подходит: он отдает шрифт обрезанным — без части популярных символов и без фич, объявленных в токенах Koobiq, — например, не отображается перечеркнутый 0. Inter подключается [файлами с rsms.me](https://rsms.me/inter/download/): в архиве готовый файл стилей.

```scss
@import 'assets/fonts/inter/inter.css';
```

Добавьте следующий код в тег `<head>`:
JetBrains Mono можно подключить по ссылке с Google Fonts:

```html
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<!-- Inter -->
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap"
rel="stylesheet"
/>
<!-- JetBrains Mono -->
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap" rel="stylesheet" />
```

#### Текстовые стили

Готовый класс использует отдельные переменные дизайн-токенов: шрифт, кегль, интерлиньяж, трекинг, вес, регистр и OpenType-фичи. Все классы перечислены [в дизайн-токенах](/ru/main/design-tokens/typography).

В разработке преимущественно используются готовые классы, а не собственные стили из отдельных переменных: переменные дизайн-токенов нужны для частичной кастомизации. Классы приходят [с темой](/ru/main/theming/overview), а при сборке из SCSS-миксинов их добавляет `koobiq-typography()`.

```html
<h2 class="kbq-headline">Заголовок</h2>
<p class="kbq-text-normal">Текст интерфейса</p>
```

#### Изменение шрифтов

Семейства шрифтов заданы глобальными переменными, их переопределение меняет шрифты во всем интерфейсе. Переопределение ставится после подключения токенов, иначе применяется значение из токенов.

```scss
:root {
--kbq-font-family-base: 'MySans', sans-serif;
--kbq-font-family-accent: 'MyDisplay', 'MySans', sans-serif;
--kbq-font-family-mono: 'MyMono', monospace;
}
```

#### Проверка файлов

Перед подключением файл проверяется: в нем должны быть символы, которые использует интерфейс, и OpenType-фичи, которые включает Koobiq. Раздача по **unicode-range** — так работают CDN и собранные из них сабсеты, например Inter в Fontsource, — выбрасывает вместе с глифами и фичи.
2 changes: 2 additions & 0 deletions tools/cspell-locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"refreshable",
"Repobeats",
"Resizer",
"rsms",
"scrollbars",
"sidepanel",
"sidepanels",
Expand All @@ -75,6 +76,7 @@
"unmigrated",
"unminified",
"unparseable",
"webfonts",
"xmark",
"yarnrc"
]
Expand Down
2 changes: 2 additions & 0 deletions tools/cspell-locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
"рендерится",
"рендерятся",
"роутингом",
"сабсеты",
"сайдпанелей",
"сайдпанели",
"сайдпанель",
Expand Down Expand Up @@ -299,6 +300,7 @@
"тултипом",
"тултипы",
"уплощает",
"фичи",
"форком",
"форматтер",
"форматтером",
Expand Down
Loading