@ozen-ui/fonts 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/assets/roboto-medium.woff2 +0 -0
- package/assets/roboto-regular.woff2 +0 -0
- package/package.json +25 -0
- package/style.css +15 -0
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @ozen-ui/fonts
|
|
2
|
+
|
|
3
|
+
Набор базовых шрифтов.
|
|
4
|
+
|
|
5
|
+
## Установка
|
|
6
|
+
|
|
7
|
+
В текущей директории проекта запустите одну из следующих команд:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# npm
|
|
11
|
+
npm install --save @ozen-ui/fonts
|
|
12
|
+
|
|
13
|
+
# yarn
|
|
14
|
+
yarn add @ozen-ui/fonts
|
|
15
|
+
|
|
16
|
+
# pnpm
|
|
17
|
+
pnpm add @ozen-ui/fonts
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Подключение
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
import '@ozen-ui/fonts';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Применение
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
body {
|
|
30
|
+
font-family: 'Roboto', sans-serif;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Предзагрузка шрифтов
|
|
35
|
+
|
|
36
|
+
Для критически важных шрифтов рекомендуется использовать предварительную загрузку.
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<link
|
|
40
|
+
rel="preload"
|
|
41
|
+
href="/path/to/font/roboto-regular.woff2"
|
|
42
|
+
as="font"
|
|
43
|
+
type="font/woff2"
|
|
44
|
+
crossorigin
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Поддерживаемые переменные
|
|
49
|
+
|
|
50
|
+
| Weight | Fonts |
|
|
51
|
+
| ------ | ------ |
|
|
52
|
+
| 400 | Roboto |
|
|
53
|
+
| 500 | Roboto |
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ozen-ui/fonts",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A collection of fonts",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "style.css",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"Özen-UI",
|
|
9
|
+
"Design system",
|
|
10
|
+
"fonts",
|
|
11
|
+
"roboto"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"clean": "rimraf .turbo",
|
|
18
|
+
"test": "exit 0",
|
|
19
|
+
"lint:css": "stylelint --fix **/*.css",
|
|
20
|
+
"lint": "pnpm lint:css",
|
|
21
|
+
"release": "pnpm publish",
|
|
22
|
+
"build": "exit 0",
|
|
23
|
+
"type-check": "exit 0"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/style.css
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: Roboto;
|
|
3
|
+
font-style: normal;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
src: url('./assets/roboto-regular.woff2') format('woff2');
|
|
6
|
+
font-display: swap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: Roboto;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
src: url('./assets/roboto-medium.woff2') format('woff2');
|
|
14
|
+
font-display: swap;
|
|
15
|
+
}
|