@yschimke/remote-compose-player-cmp 2.2.1 → 2.4.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 +29 -3
- package/dist/fonts/GoogleSansFlex-OFL.txt +93 -0
- package/dist/fonts/NotoSansMono-OFL.txt +93 -0
- package/dist/fonts/NotoSansMono-Variable.ttf +0 -0
- package/dist/fonts/NotoSerif-OFL.txt +93 -0
- package/dist/fonts/NotoSerif-Variable.ttf +0 -0
- package/dist/fonts/README.md +40 -52
- package/dist/fonts/fonts.json +216 -12
- package/dist/fonts/google-sans-flex-variable.ttf +0 -0
- package/dist/fonts/inter-variable.ttf +0 -0
- package/dist/fonts/jetbrains-mono-variable.ttf +0 -0
- package/dist/fonts/orbitron-variable.ttf +0 -0
- package/dist/fonts/space-grotesk-variable.ttf +0 -0
- package/dist/rc-cmp-player.js +411 -0
- package/dist/rcPlayer.import-object.mjs +68 -12
- package/dist/rcPlayer.wasm +0 -0
- package/package.json +1 -1
- package/dist/fonts/DroidSansMono.ttf +0 -0
- package/dist/fonts/LICENSE.txt +0 -201
- package/dist/fonts/NotoSerif-Regular.ttf +0 -0
- package/dist/fonts/Roboto-Medium.ttf +0 -0
- package/dist/fonts/Roboto-Regular.ttf +0 -0
- package/dist/fonts/google-sans-flex-400.ttf +0 -0
- package/dist/fonts/google-sans-flex-700.ttf +0 -0
- package/dist/fonts/inter-400.ttf +0 -0
- package/dist/fonts/inter-700.ttf +0 -0
- package/dist/fonts/jetbrains-mono-400.ttf +0 -0
- package/dist/fonts/jetbrains-mono-700.ttf +0 -0
- package/dist/fonts/orbitron-400.ttf +0 -0
- package/dist/fonts/orbitron-700.ttf +0 -0
- package/dist/fonts/space-grotesk-400.ttf +0 -0
- package/dist/fonts/space-grotesk-700.ttf +0 -0
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
|
-
|
|
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
|
|
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.
|
|
Binary file
|
|
@@ -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.
|
|
Binary file
|
package/dist/fonts/README.md
CHANGED
|
@@ -1,53 +1,46 @@
|
|
|
1
1
|
# Catalog fonts (vendored)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
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:
|
|
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.
|