@aurea-uds/fonts 0.61.0 → 0.62.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 +50 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
# @aurea-uds/fonts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The fonts of **Aurea UDS**, with the `@font-face` rules it expects (since `0.39.0`):
|
|
4
4
|
|
|
5
|
-
- **Inter**
|
|
6
|
-
- **Sora**
|
|
7
|
-
- **IBM Plex Mono**
|
|
5
|
+
- **Inter** for text and controls;
|
|
6
|
+
- **Sora** for headings;
|
|
7
|
+
- **IBM Plex Mono** for code and values (`numeric` and the `KPI` number).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Up to `0.38.0` the web used Atkinson Hyperlegible; up to `0.12.4`, IBM Plex.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
pnpm add @aurea-uds/fonts
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
import "@aurea-uds/fonts/css"; //
|
|
16
|
+
import "@aurea-uds/fonts/css"; // BEFORE @aurea-uds/core/css
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
Order matters: the core only declares `--font-ui`, `--font-heading`, `--font-editorial` and `--font-code`,
|
|
20
|
+
and this package is what points those names to real files. Import the core first and the first paint
|
|
21
|
+
falls back to a system font.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
zero.
|
|
25
|
-
(`body{font-family:…}`)
|
|
23
|
+
Headings get Sora on their own: the core applies `--font-heading` to every `h1` to `h6` through a
|
|
24
|
+
zero-specificity rule. A font you set on the heading itself wins over it; a font the heading only
|
|
25
|
+
inherits from its parent (`body{font-family:…}`) loses.
|
|
26
26
|
|
|
27
|
-
⚠ `--font-editorial`
|
|
28
|
-
|
|
27
|
+
⚠ `--font-editorial` has no font of its own: it points to the text font (Inter today). It still exists
|
|
28
|
+
only so that code using it does not break; it is removed in `1.0`.
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## In React Native
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
`.ttf
|
|
34
|
-
`FONT_FAMILIES`
|
|
32
|
+
React Native does not read `woff2`, and on Android it does not read variable fonts: native gets the same
|
|
33
|
+
three families as static `.ttf`, one file per weight (`@aurea-uds/fonts/native`). Load `AUREA_FONTS` and
|
|
34
|
+
pass `FONT_FAMILIES` to `AureaProvider`:
|
|
35
35
|
|
|
36
36
|
```tsx
|
|
37
37
|
import {AureaProvider} from "@aurea-uds/native";
|
|
@@ -40,54 +40,54 @@ import {useFonts} from "expo-font";
|
|
|
40
40
|
|
|
41
41
|
const [pronto] = useFonts(AUREA_FONTS);
|
|
42
42
|
// ...
|
|
43
|
-
<AureaProvider fontFamilies={FONT_FAMILIES}>{/*
|
|
43
|
+
<AureaProvider fontFamilies={FONT_FAMILIES}>{/* your app */}</AureaProvider>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
`Sora-Bold`, `IBMPlexMono-Medm`.
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
On the device, each weight is a family of its own, named after the file's PostScript name:
|
|
47
|
+
`Inter-SemiBold`, `Sora-Bold`, `IBMPlexMono-Medm`. `FONT_FAMILIES` points the requested role and weight to
|
|
48
|
+
them; without it, the device falls back to the system font. There are 14 files, **complete** (every
|
|
49
|
+
script each font draws): 3.17 MB in the app.
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Where the files come from
|
|
52
52
|
|
|
53
|
-
|
|
|
53
|
+
| file | source | how |
|
|
54
54
|
|---|---|---|
|
|
55
|
-
| `inter-variable-normal.woff2`, `inter-variable-italic.woff2` | Inter 4.1
|
|
56
|
-
| `sora-variable-normal.woff2` | `google/fonts`, `ofl/sora/Sora[wght].ttf`, commit `a926665019d3` |
|
|
57
|
-
| `ibm-plex-mono-400-normal.woff2`, `-500-`, `-600-` | `@ibm/plex-mono` 2.5.0, `fonts/split/woff2/IBMPlexMono-{Regular,Medium,SemiBold}-Latin1.woff2` | **
|
|
55
|
+
| `inter-variable-normal.woff2`, `inter-variable-italic.woff2` | Inter 4.1 from the author (`rsms/inter`, `Inter-4.1.zip`, folder `web/`) | subset to the Latin range by `cortar-fontes.py`; still variable (weight 100–900 and optical size 14–32) |
|
|
56
|
+
| `sora-variable-normal.woff2` | `google/fonts`, `ofl/sora/Sora[wght].ttf`, commit `a926665019d3` | subset the same way; variable (weight 100–800) |
|
|
57
|
+
| `ibm-plex-mono-400-normal.woff2`, `-500-`, `-600-` | `@ibm/plex-mono` 2.5.0, `fonts/split/woff2/IBMPlexMono-{Regular,Medium,SemiBold}-Latin1.woff2` | **no change at all** (the license reserves the name "Plex") — only the file name |
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
The subset keeps the characters the web served before (the `latin` subset, 218) and every design
|
|
60
|
+
feature, such as equal-width figures (`tnum`). Inter keeps 217 of them (the original has no division
|
|
61
|
+
slash `∕`) and Sora 217 (it has no thin space); the `Latin1` subset of IBM Plex Mono covers 214. To
|
|
62
|
+
rebuild and check:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
python packages/fonts/cortar-fontes.py <InterVariable.woff2> <InterVariable-Italic.woff2> <Sora[wght].ttf>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
The script prints the digest (sha256) of each file. The IBM files are checked against IBM's package:
|
|
69
69
|
|
|
70
|
-
|
|
|
70
|
+
| file | sha256 (start) |
|
|
71
71
|
|---|---|
|
|
72
72
|
| `ibm-plex-mono-400-normal.woff2` | `e8993d946649b9d0` |
|
|
73
73
|
| `ibm-plex-mono-500-normal.woff2` | `41201b658a328b9d` |
|
|
74
74
|
| `ibm-plex-mono-600-normal.woff2` | `b7acd05041ab65f3` |
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
The native `.ttf` files (`files-native/`):
|
|
77
77
|
|
|
78
|
-
|
|
|
78
|
+
| file | source | how |
|
|
79
79
|
|---|---|---|
|
|
80
|
-
| `inter-{400,500,600,700,800}-normal.ttf`, `inter-400-italic.ttf` | Inter 4.1
|
|
81
|
-
| `sora-{400,500,600,700,800}-normal.ttf` |
|
|
82
|
-
| `ibm-plex-mono-{400,500,600}-normal.ttf` | `@ibm/plex-mono` 2.5.0, `fonts/complete/ttf/IBMPlexMono-{Regular,Medium,SemiBold}.ttf` | **
|
|
80
|
+
| `inter-{400,500,600,700,800}-normal.ttf`, `inter-400-italic.ttf` | Inter 4.1 from the author (`Inter-4.1.zip`, folder `extras/ttf/`) | **no change**, only the file name |
|
|
81
|
+
| `sora-{400,500,600,700,800}-normal.ttf` | the same `Sora[wght].ttf` as the web | pinned to one weight per file, with each weight's name |
|
|
82
|
+
| `ibm-plex-mono-{400,500,600}-normal.ttf` | `@ibm/plex-mono` 2.5.0, `fonts/complete/ttf/IBMPlexMono-{Regular,Medium,SemiBold}.ttf` | **no change** (the reserved name "Plex") |
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
python packages/fonts/fontes-nativas.py <Inter-4.1.zip> <ibm-plex-mono.zip> <Sora[wght].ttf>
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
The script gives the same output on every run and prints the digest of each file:
|
|
89
89
|
|
|
90
|
-
|
|
|
90
|
+
| file | sha256 (start) |
|
|
91
91
|
|---|---|
|
|
92
92
|
| `inter-400-normal.ttf` | `40d692fce188e447` |
|
|
93
93
|
| `inter-400-italic.ttf` | `bbc051dd204b5019` |
|
|
@@ -104,16 +104,16 @@ O script sai igual a cada rodada e imprime o resumo de cada arquivo:
|
|
|
104
104
|
| `ibm-plex-mono-500-normal.ttf` | `98fbd727aae340b2` |
|
|
105
105
|
| `ibm-plex-mono-600-normal.ttf` | `f04d7c488ddf7d1f` |
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
Up to `0.40.0` native used Atkinson Hyperlegible; none of its files remain in the package.
|
|
108
108
|
|
|
109
|
-
##
|
|
109
|
+
## Why a package of its own
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
It was split out of the core so that anyone who already serves the font — from their own CDN, or hosted
|
|
112
|
+
with other subsets — can skip it without copying and editing the stylesheet.
|
|
113
113
|
|
|
114
|
-
##
|
|
114
|
+
## License
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
The three families are under the **SIL Open Font License 1.1**, and the license text ships with the
|
|
117
|
+
package, with the copyright of each one. IBM Plex Mono has the **reserved font name "Plex"**: a modified
|
|
118
|
+
file cannot carry that name — that is why its files ship unchanged. The OFL is not Apache-2.0: read it
|
|
119
|
+
before redistributing the font files.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurea-uds/fonts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.1",
|
|
4
4
|
"description": "As fontes da Aurea: Inter (texto), Sora (títulos) e IBM Plex Mono (código), em WOFF2 para a web (@aurea-uds/fonts/css). Para o React Native (@aurea-uds/fonts/native), as mesmas três em TTF estático, um arquivo por peso.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aurea",
|