@yschimke/remote-compose-player-cmp 2.2.1 → 2.3.0

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 CHANGED
@@ -8,6 +8,23 @@ parameters and one `window` function — no JavaScript API to learn and no bundl
8
8
  <iframe src="/rc-player/index.html?src=/documents/watch-face.rc&theme=dark"></iframe>
9
9
  ```
10
10
 
11
+ Or include the embed library beside it, which owns the iframe and turns the contract into promises:
12
+
13
+ ```html
14
+ <script src="/rc-player/rc-cmp-player.js"></script>
15
+ <rc-cmp-player src="/documents/watch-face.rc" width="400" height="400"></rc-cmp-player>
16
+ <script>
17
+ const player = RcCmp.createPlayer(container, { width: 400, height: 400 });
18
+ await player.loadFromArrayBuffer(bytes); // e.g. a dropped file; resolves once it is on screen
19
+ </script>
20
+ ```
21
+
22
+ `rc-cmp-player.js` talks to the player only by `postMessage`, so `dist/` may be served from any
23
+ origin, a CDN included. It finds `index.html` next to itself (override with `playerUrl`), and
24
+ `loadFromUrl` fetches on your page and sends the bytes, so documents need no CORS headers. The
25
+ server, whichever it is, must send `index.html` as `text/html` and `.wasm` as `application/wasm`,
26
+ and must allow the page to be framed.
27
+
11
28
  ## Install
12
29
 
13
30
  ```
@@ -15,9 +32,10 @@ npm install @yschimke/remote-compose-player-cmp
15
32
  ```
16
33
 
17
34
  The package ships a `dist/` directory: `index.html`, the compiled Wasm module, the Skiko runtime,
18
- and a fonts manifest. Serve it as static files — copy `dist/` into your public directory, or point
35
+ a fonts manifest and the `rc-cmp-player.js` embed library. Serve it as static files — copy `dist/` into your public directory, or point
19
36
  your server at `node_modules/@yschimke/remote-compose-player-cmp/dist`. Nothing here is meant to be
20
- imported into an app bundle; the player runs in its own document.
37
+ imported into an app bundle; the player runs in its own document, and `rc-cmp-player.js` is a plain
38
+ `<script>`.
21
39
 
22
40
  Every file must be served from the same directory, and `.wasm` must be served as
23
41
  `application/wasm` — the module is instantiated by streaming.
@@ -53,10 +71,18 @@ Summary:
53
71
 
54
72
  - `window.rcPlayerLoad(src)` swaps the document without reloading the page, keeping the Wasm module,
55
73
  the Compose runtime and the fetched fonts warm.
74
+ - `window.rcPlayerLoadBytes(bytes)` does the same from an `ArrayBuffer` or `Uint8Array` the page
75
+ already holds, such as a dropped file. Open the page without `?src=`, wait for the marker to
76
+ settle on `error` ("Missing ?src"), then call it. Feature-detect it: it was added within
77
+ contract version 1.
56
78
  - `document.documentElement.dataset.rcPlayerState` is `loading`, `ready` or `error`. Wait for
57
79
  `ready` before revealing the frame; `rcPlayerError` carries the message on `error`.
80
+ - From another origin, `postMessage` the iframe `{type: 'rc-player-hello', id}` until it answers,
81
+ then `{type: 'rc-player-load', id, bytes}`; each load is answered by
82
+ `{type: 'rc-player-state', id, state, error?}`.
58
83
  - The player also `postMessage`s `cp-rc-wasm-ready` / `cp-rc-wasm-error:<message>` and structured
59
- host-action and debug-message events to `window.parent`, same-origin.
84
+ host-action and debug-message events to `window.parent`: same-origin, and to the origin of a
85
+ parent that has sent it a message.
60
86
 
61
87
  ## Size
62
88
 
@@ -0,0 +1,93 @@
1
+ Copyright 2015 The Google Sans Flex Authors (https://github.com/googlefonts/googlesans-flex)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,53 +1,46 @@
1
1
  # Catalog fonts (vendored)
2
2
 
3
- All files are extracted from `org.robolectric:nativeruntime-dist-compat:1.0.19` (`fonts/`
4
- inside the jar, Maven Central), i.e. **the exact font files the Android snapshot renderer
5
- rasterizes with** under Robolectric's native graphics. Using the same bytes is what makes the
6
- in-browser Wasm tier's text wrap, truncate, and measure identically to the baked catalog PNGs;
7
- classic Roboto 2.x and CMP's bundled default both differ measurably (see PR history).
3
+ Every family is a **variable** font except Lobster Two, which has no variable release. A variable
4
+ file is listed in [`fonts.json`](fonts.json) once per weight it covers (`100`…`900`, clipped to
5
+ its `wght` range), every row naming the same file: the loaders read each file once and build each
6
+ weight as an instance of it (`FontVariation.weight`), so `FontWeight.Medium` is the 500 instance
7
+ rather than the nearest static, and a text's own variation settings reach the same bytes.
8
8
 
9
- - `Roboto-Regular.ttf` + `Roboto-Medium.ttf` — the two weights Material 3's type scale uses
10
- (`role: "default"`; applied to the whole M3 `Typography`).
11
- - `NotoSerif-Regular.ttf` + `DroidSansMono.ttf` — what Android's system font table
12
- (`fonts.xml`) maps the generic `serif` / `monospace` families to (`role: "generic"`;
13
- consumed by `genericFontFamily(...)` lookups in catalog components — CMP's
14
- `FontFamily.Resolver` is sealed, so resolver-level interception isn't available to apps).
15
- - `orbitron-400.ttf` + `orbitron-700.ttf` — a downloadable **GoogleFont** (`role: "named"`), the
16
- faces the `text-branded` specimen resolves via `namedFontFamily("Orbitron")`. Filenames follow
17
- the `<slug>-<weight>.ttf` scheme the manifest generator expects (`GoogleFontKey.slugify`); the
18
- export regenerates the `role: "named"` entry from the recorded `Font(GoogleFont("Orbitron"), …)`
19
- usage. Downloaded from Google Fonts, SIL OFL-1.1 — see [Orbitron-OFL.txt](Orbitron-OFL.txt).
9
+ The variable files are subset to the code points the static files they replaced covered (all
10
+ axes and all layout features kept). Two have gaps their variable sources do not fill, so those
11
+ characters fall back to the platform's face:
20
12
 
21
- - `google-sans-flex-400.ttf` + `google-sans-flex-700.ttf` — a downloadable **GoogleFont**
22
- (`role: "named"`), the face the `remote-m3` catalog's **Google Sans Flex** typeface
23
- theme names as `google:Google Sans Flex`. This lane is *manifest-only* — it never fetches — so
24
- without the face vendored here the themed document fails `RcComposeSupport.fontFamilyIssue`'s
25
- availability check instead of rendering, while the other four player lanes resolve it. Fetched
26
- from the same CSS2 endpoint as the others (`wght@100..1000`, the 400 and 700 instances of the
27
- variable file).
13
+ - Noto Serif (112 code points, from Robolectric's static): Coptic letters U+03E2–03EF, arrows
14
+ (`←↑→↓↔↕↨`), math operators (`∂∆∏∑∕∙√∞∟∩∫≈≠≡≤≥`), box drawing and blocks U+2500–25FF, and a few
15
+ miscellaneous symbols. Serif text rarely carries them; set a `monospace` or default face for
16
+ diagrams.
17
+ - Noto Sans Mono (8, from Droid Sans Mono): the soft hyphen, `∏∑∫` and the `fi fl ffi ffl`
18
+ presentation forms (the plain letters still shape).
28
19
 
29
- **Licensing — read before forking.** Unlike every other face here, Google Sans Flex is in **no
30
- license directory** of the [google/fonts](https://github.com/google/fonts) corpus, so its terms
31
- can't be read off the corpus; the CSS2 endpoint serves it regardless. It is committed because
32
- the project owner confirmed redistribution is cleared, the same clearance
33
- [`deploy/image/README.md`](https://github.com/yschimke/compose-preview-server/blob/main/deploy/image/README.md) records for baking it into
34
- the runtime image. **A fork does not inherit that clearance** — re-check it, or drop this family
35
- from `fonts.json` and delete the two files. Dropping it only costs the Wasm lane's rendering of
36
- that one theme.
37
-
38
- - `inter-400.ttf` + `inter-700.ttf` — a downloadable **GoogleFont** (`role: "named"`), the face
39
- four of the `remote-m3` catalog's typeface themes name as `google:Inter`. It was missing while
40
- the seven families above were present, and the CMP lane's own capability report is what found
41
- it: `composeSupportReport` writes `CoreText[21]: custom font family google:Inter (47) has no
42
- DataFont` for `ThemeSpecimenAndroidMakers`, `-ConfettiDefault`, `-Droidcon` and `-KotlinConf`.
43
- A pixel comparison could not have: the document renders, in a fallback face, and only the
44
- report says the face it asked for was never there. Fetched from the same CSS2 endpoint as the
45
- others (`wght@400;700`).
46
-
47
- The endpoint returns the two `@font-face` blocks in **descending** weight, so the first URL is
48
- the 700. Check `OS/2.usWeightClass` after downloading rather than trusting the order — naming
49
- them off the CSS order silently swaps the pair, and a 400/700 swap is not obvious in a render.
50
- SIL OFL-1.1 — see [Inter-OFL.txt](Inter-OFL.txt).
20
+ - `RobotoFlex.ttf` — the default face (`role: "default"`; applied to the whole M3 `Typography`)
21
+ and Wear's `roboto-flex`. SIL OFL-1.1 — see [RobotoFlex-OFL.txt](RobotoFlex-OFL.txt).
22
+ - `NotoSerif-Variable.ttf` + `NotoSansMono-Variable.ttf` — the generic `serif` / `monospace`
23
+ families (`role: "generic"`; consumed by `genericFontFamily(...)` lookups in catalog components —
24
+ CMP's `FontFamily.Resolver` is sealed, so resolver-level interception isn't available to apps).
25
+ Noto Serif is what Android's `fonts.xml` maps `serif` to; Noto Sans Mono replaces Droid Sans
26
+ Mono, which has no variable release. Both from google/fonts, SIL OFL-1.1 — see
27
+ [NotoSerif-OFL.txt](NotoSerif-OFL.txt) and [NotoSansMono-OFL.txt](NotoSansMono-OFL.txt).
28
+ These were Robolectric's static files; the variable ones draw slightly differently from the
29
+ Android snapshot bakes.
30
+ - `orbitron-variable.ttf`, `space-grotesk-variable.ttf`, `jetbrains-mono-variable.ttf`,
31
+ `inter-variable.ttf`, `google-sans-flex-variable.ttf` — downloadable **GoogleFont**s
32
+ (`role: "named"`), the faces catalog themes and specimens name as `google:<Family>`: Orbitron for
33
+ the `text-branded` specimen, Google Sans Flex for the `remote-m3` catalog's typeface theme, Inter
34
+ for its four conference themes (AndroidMakers, ConfettiDefault, Droidcon, KotlinConf). The
35
+ `remote-m3` lane is *manifest-only* — it never fetches — so a named face missing here fails
36
+ `RcComposeSupport.fontFamilyIssue`'s availability check instead of rendering. Each is the
37
+ google/fonts variable file, SIL OFL-1.1 — see the matching `*-OFL.txt`; Google Sans Flex's is
38
+ [GoogleSansFlex-OFL.txt](GoogleSansFlex-OFL.txt), from `ofl/googlesansflex/OFL.txt`.
39
+ Each is named `<slug>-variable.ttf`, `GoogleFontKey.variableFileName()`'s spelling, so the
40
+ Android player's `RcSharedFontCache` reads this directory as a shared Google Fonts cache and
41
+ takes the variable file over a static one.
42
+ - `LobsterTwo-Regular.ttf` + `LobsterTwo-Bold.ttf` — static, the one family with no variable
43
+ release. SIL OFL-1.1 — see [LobsterTwo-OFL.txt](LobsterTwo-OFL.txt).
51
44
 
52
45
  The committed [`fonts.json`](fonts.json) is the **dev-time default**; the design-catalog export
53
46
  regenerates it from the per-preview `fonts/used` records (`previews/<id>.fonts.json` in the packed
@@ -60,8 +53,7 @@ otherwise drop them — leaving the published viewer's font-override picks falli
60
53
 
61
54
  Loading is driven by [`fonts.json`](fonts.json): each `role: "default"` family's files are
62
55
  fetched **by URL** and become the app's whole M3 type scale (`Main.kt` → `loadCatalogFonts()`,
63
- default base `./fonts/`, overridable via `?fontsBase=`; a base without a manifest falls back to
64
- the fixed Roboto pair). Self-hosted beside the app so the bundle stays offline-clean behind an
56
+ default base `./fonts/`, overridable via `?fontsBase=`). Self-hosted beside the app so the bundle stays offline-clean behind an
65
57
  egress proxy; on the public server the serve process is the cache — it fetches these files once
66
58
  from the trusted `design-artifacts` branch and serves them locally. A fetch failure or timeout
67
59
  degrades to the CMP bundled font.
@@ -74,8 +66,4 @@ partition, so the embedding viewer page cannot warm fonts for it.
74
66
  The manifest is additive: future roles (named families, generic-family mappings like `serif`)
75
67
  can be declared per family without breaking older apps, which only consume `role: "default"`.
76
68
 
77
- License: Apache 2.0 (Roboto / Noto Serif / Droid Sans Mono, Google) — see [LICENSE.txt](LICENSE.txt);
78
- Orbitron is SIL OFL-1.1 — see [Orbitron-OFL.txt](Orbitron-OFL.txt); Inter is SIL OFL-1.1 — see
79
- [Inter-OFL.txt](Inter-OFL.txt). Google Sans Flex carries no
80
- corpus license file and ships under the owner's explicit redistribution clearance — see its bullet
81
- above before forking.
69
+ License: every face here is SIL OFL-1.1; each family's `*-OFL.txt` sits beside it.