@ptlm-azulejo/fonts-adeo 0.1.0-alpha.49

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.
Files changed (3) hide show
  1. package/README.md +74 -0
  2. package/index.css +32 -0
  3. package/package.json +17 -0
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # @ptlm-azulejo/fonts-adeo
2
+
3
+ Roboto — the **`.preset-adeo`** typeface of
4
+ [`@ptlm-azulejo/themes`](../themes/README.md) — loaded from the **Google Fonts
5
+ CDN**.
6
+
7
+ The theme names the typeface in `--font-family` but ships no `@font-face`, same
8
+ contract as upstream Mozaic. This package is one `@import`.
9
+
10
+ ## ⚠️ Read this before installing
11
+
12
+ This package makes your app fetch `fonts.googleapis.com` **at runtime**. Two
13
+ consequences you inherit:
14
+
15
+ - **Your end users' IP addresses reach Google.** In the EU that is a GDPR
16
+ consideration, and it has already cost sites fines.
17
+ - **Your app needs network access to Google** to render on-brand — it degrades to
18
+ the fallback stack offline or behind a firewall that blocks it.
19
+
20
+ For a production app with real users, **prefer self-hosting** — which is also
21
+ what [`@ptlm-azulejo/themes`](../themes/README.md#self-host-or-cdn) recommends:
22
+
23
+ ```bash
24
+ yarn add @fontsource/roboto
25
+ ```
26
+
27
+ ```js
28
+ import '@fontsource/roboto/400.css'
29
+ import '@fontsource/roboto/600.css'
30
+ import '@fontsource/roboto/700.css'
31
+ ```
32
+
33
+ `@fontsource` serves the same OFL files from your own domain. Use **5.2.x or
34
+ newer**: earlier versions predate Roboto's variable release and ship no 600 cut,
35
+ so `--font-weight-semi-bold` silently matches 700 and semi-bold renders bold.
36
+
37
+ This package exists for the cases where the CDN is genuinely the right call —
38
+ internal tools, prototypes, documentation sites.
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ yarn add @ptlm-azulejo/fonts-adeo
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ```js
49
+ import '@ptlm-azulejo/themes/presets/adeo.css'
50
+ import '@ptlm-azulejo/fonts-adeo'
51
+ ```
52
+
53
+ ### What you get
54
+
55
+ The three cuts the theme tokens reference:
56
+
57
+ | Token | Weight |
58
+ |---|---|
59
+ | `--font-weight-regular` | 400 |
60
+ | `--font-weight-semi-bold` | 600 |
61
+ | `--font-weight-bold` | 700 |
62
+
63
+ Need another weight? Roboto is a variable font on Google Fonts (`wght` 100–900),
64
+ so add your own `@import` with the axis you want — or self-host via
65
+ `@fontsource/roboto/<weight>.css`.
66
+
67
+ ## Why Roboto is not vendored here
68
+
69
+ Unlike LeroyMerlinSans (see
70
+ [`@ptlm-azulejo/fonts-leroy-merlin`](../fonts-leroy-merlin/README.md)), Roboto is
71
+ a **catalogued OFL-1.1** font — `Copyright 2011 The Roboto Project Authors`,
72
+ licence at [openfontlicense.org](https://openfontlicense.org). Anyone may
73
+ redistribute it, and `@fontsource` already does that well, so copying the
74
+ binaries into this package would only duplicate a maintained package.
package/index.css ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Roboto — the .preset-adeo typeface, from the Google Fonts CDN.
3
+ *
4
+ * Roboto is not vendored here: it is a catalogued OFL-1.1 family that Google
5
+ * serves in every cut the theme tokens reference, so this package is a single
6
+ * @import rather than a copy of the binaries.
7
+ *
8
+ * Weights map to @ptlm-azulejo/themes tokens: --font-weight-regular (400),
9
+ * --font-weight-semi-bold (600) and --font-weight-bold (700).
10
+ *
11
+ * ── Read this before adopting ────────────────────────────────────────────────
12
+ * This file makes your app fetch fonts.googleapis.com at runtime. That means the
13
+ * IP address of YOUR end users reaches Google, which is a GDPR consideration in
14
+ * the EU, and your app will not render on-brand offline or behind a firewall
15
+ * that blocks Google.
16
+ *
17
+ * If that is not acceptable — which is the normal case for a production app —
18
+ * do NOT use this package. Self-host instead:
19
+ *
20
+ * yarn add @fontsource/roboto
21
+ *
22
+ * import '@fontsource/roboto/400.css'
23
+ * import '@fontsource/roboto/600.css'
24
+ * import '@fontsource/roboto/700.css'
25
+ *
26
+ * @fontsource serves the same OFL files from your own domain. Use 5.2.x or
27
+ * newer: earlier versions predate Roboto's variable release and ship no 600
28
+ * cut, so semi-bold silently matches 700 and renders bold.
29
+ * ─────────────────────────────────────────────────────────────────────────────
30
+ */
31
+
32
+ @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap");
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@ptlm-azulejo/fonts-adeo",
3
+ "version": "0.1.0-alpha.49",
4
+ "description": "Roboto web font for the .preset-adeo brand of @ptlm-azulejo/themes, loaded from the Google Fonts CDN.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./index.css",
8
+ "./index.css": "./index.css"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org"
13
+ },
14
+ "files": [
15
+ "*.css"
16
+ ]
17
+ }