@math-blocks/fonts 0.0.0-stage → 0.1.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.
Files changed (43) hide show
  1. package/LICENSE.md +57 -0
  2. package/README.md +100 -2
  3. package/dist/index.d.ts +70 -0
  4. package/dist/index.js +114 -0
  5. package/licenses/GUST-FONT-LICENSE.txt +28 -0
  6. package/licenses/LPPL-1.3c.txt +415 -0
  7. package/licenses/OFL-1.1.txt +108 -0
  8. package/package.json +31 -3
  9. package/subsets/latin-modern-math/base.woff +0 -0
  10. package/subsets/latin-modern-math/calculus.woff +0 -0
  11. package/subsets/latin-modern-math/linear-algebra.woff +0 -0
  12. package/subsets/latin-modern-math/sets-logic.woff +0 -0
  13. package/subsets/latin-modern-math/trig-geometry.woff +0 -0
  14. package/subsets/pennstander-math/base.woff +0 -0
  15. package/subsets/pennstander-math/calculus.woff +0 -0
  16. package/subsets/pennstander-math/linear-algebra.woff +0 -0
  17. package/subsets/pennstander-math/sets-logic.woff +0 -0
  18. package/subsets/pennstander-math/trig-geometry.woff +0 -0
  19. package/subsets/stix-two-math/base.woff +0 -0
  20. package/subsets/stix-two-math/calculus.woff +0 -0
  21. package/subsets/stix-two-math/linear-algebra.woff +0 -0
  22. package/subsets/stix-two-math/sets-logic.woff +0 -0
  23. package/subsets/stix-two-math/trig-geometry.woff +0 -0
  24. package/subsets/tex-gyre-bonum-math/base.woff +0 -0
  25. package/subsets/tex-gyre-bonum-math/calculus.woff +0 -0
  26. package/subsets/tex-gyre-bonum-math/linear-algebra.woff +0 -0
  27. package/subsets/tex-gyre-bonum-math/sets-logic.woff +0 -0
  28. package/subsets/tex-gyre-bonum-math/trig-geometry.woff +0 -0
  29. package/subsets/tex-gyre-pagella-math/base.woff +0 -0
  30. package/subsets/tex-gyre-pagella-math/calculus.woff +0 -0
  31. package/subsets/tex-gyre-pagella-math/linear-algebra.woff +0 -0
  32. package/subsets/tex-gyre-pagella-math/sets-logic.woff +0 -0
  33. package/subsets/tex-gyre-pagella-math/trig-geometry.woff +0 -0
  34. package/subsets/tex-gyre-schola-math/base.woff +0 -0
  35. package/subsets/tex-gyre-schola-math/calculus.woff +0 -0
  36. package/subsets/tex-gyre-schola-math/linear-algebra.woff +0 -0
  37. package/subsets/tex-gyre-schola-math/sets-logic.woff +0 -0
  38. package/subsets/tex-gyre-schola-math/trig-geometry.woff +0 -0
  39. package/subsets/tex-gyre-termes-math/base.woff +0 -0
  40. package/subsets/tex-gyre-termes-math/calculus.woff +0 -0
  41. package/subsets/tex-gyre-termes-math/linear-algebra.woff +0 -0
  42. package/subsets/tex-gyre-termes-math/sets-logic.woff +0 -0
  43. package/subsets/tex-gyre-termes-math/trig-geometry.woff +0 -0
package/LICENSE.md ADDED
@@ -0,0 +1,57 @@
1
+ # Licences
2
+
3
+ This package holds two kinds of files, under different licences.
4
+
5
+ ## Code and metadata
6
+
7
+ The JavaScript in `dist/` is released under the MIT License, like the rest of
8
+ [math-blocks](https://github.com/math-blocks/math-blocks).
9
+
10
+ ## Fonts
11
+
12
+ The files in `subsets/` are subsets of the fonts below, renamed to
13
+ "MathBlocks Math A" to "MathBlocks Math G". The fonts' licences require or ask
14
+ for modified versions to be renamed. Each subset keeps its original font's
15
+ copyright, trademark and licence entries in its `name` table.
16
+
17
+ | Folder in `subsets/` | Family | Made from | Licence |
18
+ | --- | --- | --- | --- |
19
+ | `stix-two-math` | MathBlocks Math A | STIX Two Math 2.02 | [SIL Open Font License 1.1](licenses/OFL-1.1.txt) |
20
+ | `latin-modern-math` | MathBlocks Math B | Latin Modern Math 1.959 | [GUST Font License](licenses/GUST-FONT-LICENSE.txt) |
21
+ | `tex-gyre-bonum-math` | MathBlocks Math C | TeX Gyre Bonum Math 1.005 | [GUST Font License](licenses/GUST-FONT-LICENSE.txt) |
22
+ | `tex-gyre-pagella-math` | MathBlocks Math D | TeX Gyre Pagella Math 1.632 | [GUST Font License](licenses/GUST-FONT-LICENSE.txt) |
23
+ | `tex-gyre-schola-math` | MathBlocks Math E | TeX Gyre Schola Math 1.533 | [GUST Font License](licenses/GUST-FONT-LICENSE.txt) |
24
+ | `tex-gyre-termes-math` | MathBlocks Math F | TeX Gyre Termes Math 1.543 | [GUST Font License](licenses/GUST-FONT-LICENSE.txt) |
25
+ | `pennstander-math` | MathBlocks Math G | Pennstander Math 0.001 (variable: `wght`, `MWGT`, `MLNT`) | [SIL Open Font License 1.1](licenses/OFL-1.1.txt) |
26
+
27
+ The GUST Font License is the [LaTeX Project Public License 1.3c](licenses/LPPL-1.3c.txt)
28
+ plus a request to rename modified versions.
29
+
30
+ ### Copyright notices
31
+
32
+ - **STIX Two Math:** Copyright (c) 2001-2016 by the STI Pub Companies,
33
+ consisting of the American Chemical Society, the American Institute of
34
+ Physics, the American Mathematical Society, the American Physical Society,
35
+ Elsevier, Inc., and The Institute of Electrical and Electronic Engineers,
36
+ Inc. Portions copyright (c) 1998-2003 by MicroPress, Inc. Portions copyright
37
+ (c) 1990 by Elsevier, Inc. All rights reserved. Portions copyright (c)
38
+ Copyright 2010, 2012, 2014 Adobe Systems Incorporated. STIX Fonts(TM) is a
39
+ trademark of The Institute of Electrical and Electronics Engineers, Inc.
40
+ - **Latin Modern Math:** Copyright 2012--2014 for Latin Modern Math OTF by
41
+ B. Jackowski, P. Strzelczyk and P. Pianowski (on behalf of TeX users groups).
42
+ - **TeX Gyre Bonum Math:** Copyright 2013 for Tex Gyre Bonum Math OTF by
43
+ B. Jackowski, P. Strzelczyk and P. Pianowski (on behalf of TeX users groups).
44
+ - **TeX Gyre Pagella Math:** Copyright 2012--2014 for Tex Gyre Pagella Math OTF
45
+ by B. Jackowski, P. Strzelczyk and P. Pianowski (on behalf of TeX users
46
+ groups).
47
+ - **TeX Gyre Schola Math:** Copyright 2014 for Tex Gyre Schola Math OTF by
48
+ B. Jackowski, P. Strzelczyk and P. Pianowski (on behalf of TeX users groups).
49
+ - **TeX Gyre Termes Math:** Copyright 2012--2014 for Tex Gyre Termes Math OTF
50
+ by B. Jackowski, P. Strzelczyk and P. Pianowski (on behalf of TeX users
51
+ groups).
52
+ - **Pennstander Math:** Copyright 2020 The Grandstander Project Authors
53
+ (https://github.com/Etcetera-Type-Co/Grandstander). Copyright 2024 Julius
54
+ Ross. Pennstander Math is by Julius Ross
55
+ (https://github.com/juliusross1/Pennstander), based on Grandstander by
56
+ Etcetera Type Co. (https://etceteratype.co/grandstander). It has no Reserved
57
+ Font Name.
package/README.md CHANGED
@@ -1,3 +1,101 @@
1
- # Temporary Holding Version
1
+ # @math-blocks/fonts
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The math fonts that `@math-blocks/react` renders with. You don't use these
4
+ files directly: they're loaded with `loadFontSubsets` from
5
+ `@math-blocks/opentype` and passed to `@math-blocks/react` through
6
+ `FontDataContext`. A simpler setup in `@math-blocks/react` is planned in
7
+ [#881](https://github.com/math-blocks/math-blocks/issues/881).
8
+
9
+ Each font is split into one small WOFF file per glyph group (see `glyphGroups`
10
+ in `@math-blocks/opentype`), so a page only downloads the characters it uses.
11
+ They need `DecompressionStream`, which current browsers and Node 18+ have.
12
+
13
+ ## Using the fonts with `@math-blocks/react`
14
+
15
+ Make the package's `subsets/` folder available at a URL, load the glyph
16
+ groups you need, and provide the result:
17
+
18
+ ```tsx
19
+ import { fromBaseUrl, getFontData, loadFontSubsets } from '@math-blocks/opentype';
20
+ import { FontDataContext, MathRenderer } from '@math-blocks/react';
21
+
22
+ const font = await loadFontSubsets(
23
+ ['base', 'calculus'],
24
+ fromBaseUrl('/fonts/stix-two-math'),
25
+ );
26
+
27
+ <FontDataContext.Provider value={getFontData(font, 'stix-two-math')}>
28
+ <MathRenderer row={row} />
29
+ </FontDataContext.Provider>;
30
+ ```
31
+
32
+ Ways to get the files to a URL:
33
+
34
+ - **Your app's static folder.** Copy `node_modules/@math-blocks/fonts/subsets/`
35
+ into it, e.g. `public/fonts/` with Vite or rsbuild, or with a copy plugin in
36
+ rspack or webpack. The copied files don't get hashed names, so include the
37
+ package version in the folder name or set suitable cache headers.
38
+ - **An npm CDN**, with no copying:
39
+ `fromBaseUrl('https://cdn.jsdelivr.net/npm/@math-blocks/fonts@<version>/subsets/stix-two-math')`.
40
+
41
+ For server rendering, read the files from disk instead: `subsetPath(folder,
42
+ group)` gives a file's path inside the package, for
43
+ `require.resolve('@math-blocks/fonts/' + subsetPath(...))`.
44
+
45
+ ## What's in the package
46
+
47
+ ```
48
+ subsets/
49
+ stix-two-math/
50
+ base.woff calculus.woff linear-algebra.woff ...
51
+ latin-modern-math/
52
+ tex-gyre-bonum-math/
53
+ tex-gyre-pagella-math/
54
+ tex-gyre-schola-math/
55
+ tex-gyre-termes-math/
56
+ pennstander-math/
57
+ licenses/
58
+ OFL-1.1.txt GUST-FONT-LICENSE.txt LPPL-1.3c.txt
59
+ ```
60
+
61
+ ### Variable fonts
62
+
63
+ `pennstander-math` is a variable font, with weight (`wght`), math weight
64
+ (`MWGT`) and math slant (`MLNT`) axes. Its subsets keep the variation data, so
65
+ they're about twice the size of a static font's. `@math-blocks/opentype`
66
+ draws it at its Regular instance by default, and `font.atLocation(...)` gives
67
+ any other weight or slant.
68
+
69
+ ## Exports
70
+
71
+ - `fonts`: every font in the package. Each has its display `name`, its
72
+ `folder` in `subsets/`, the `family` name inside the subset files, the
73
+ `source` font it was made from, its `license`, and the `licenseFile` that
74
+ holds the licence's text.
75
+ - `getFont(folder)`: the font in `subsets/<folder>/`, or `undefined`.
76
+ - `subsetPath(folder, group)`: a subset file's path inside the package, such
77
+ as `subsets/stix-two-math/base.woff`.
78
+ - `FONT_FOLDERS`: every font's folder, in order. `isFontFolder(folder)`
79
+ checks a string against it.
80
+ - Types: `MathFont`, `FontFolder` (the union of the folder names, so a typo
81
+ such as `'stix-two-mat'` is a type error), `FontLicense`.
82
+
83
+ ## Licences
84
+
85
+ The JavaScript is MIT-licensed. The fonts keep their original licences:
86
+ STIX Two Math and Pennstander Math are under the SIL Open Font License 1.1,
87
+ and Latin Modern Math and the TeX Gyre fonts are under the GUST Font License. See
88
+ [LICENSE.md](LICENSE.md) for details and copyright notices.
89
+
90
+ ## Updating the subsets
91
+
92
+ The subsets are built from the fonts in the repository's `assets/` folder by
93
+ `scripts/subset-fonts.py`, using the list in `src/fonts.json`, which writes
94
+ them straight to WOFF. To add a font,
95
+ add an entry there, put its source file in `assets/`, and run
96
+ `python3 scripts/subset-fonts.py`.
97
+
98
+ The script also writes `src/fonts.generated.ts`, which lists the folders as a
99
+ TypeScript `as const` array for the `FontFolder` type: TypeScript reads
100
+ strings imported from JSON as plain `string`. Don't edit it by hand. A unit
101
+ test fails if it doesn't match `fonts.json`.
@@ -0,0 +1,70 @@
1
+ /** The folder in `subsets/` of each font in fonts.json, in order. */
2
+ export declare const FONT_FOLDERS: readonly ['stix-two-math', 'latin-modern-math', 'tex-gyre-bonum-math', 'tex-gyre-pagella-math', 'tex-gyre-schola-math', 'tex-gyre-termes-math', 'pennstander-math'];
3
+ /**
4
+ * The folder in `subsets/` of a font this package ships, such as
5
+ * "stix-two-math". It comes from fonts.generated.ts, which
6
+ * scripts/subset-fonts.py writes from fonts.json: TypeScript widens strings
7
+ * imported from JSON to `string`, so fonts.json alone can't give this type.
8
+ */
9
+ type FontFolder = (typeof FONT_FOLDERS)[number];
10
+ /** Returns true if `folder` is the folder of a font this package ships. */
11
+ export declare const isFontFolder: (folder: string) => folder is FontFolder;
12
+ /**
13
+ * The licence a font is distributed under. Each one's text is in this
14
+ * package's `licenses/` folder:
15
+ *
16
+ * - `'OFL-1.1'`: the SIL Open Font License 1.1 (`licenses/OFL-1.1.txt`).
17
+ * - `'GUST-Font-License'`: the GUST Font License
18
+ * (`licenses/GUST-FONT-LICENSE.txt`), which is the LaTeX Project Public
19
+ * License 1.3c (`licenses/LPPL-1.3c.txt`) plus a request to rename modified
20
+ * versions.
21
+ */
22
+ type FontLicense = 'OFL-1.1' | 'GUST-Font-License';
23
+ /** A math font whose subsets this package ships. */
24
+ type MathFont = {
25
+ /** The name of the font the subsets were made from, e.g. "STIX Two Math". */
26
+ readonly name: string;
27
+ /**
28
+ * The folder in `subsets/` that holds this font's subset files, e.g.
29
+ * "stix-two-math".
30
+ */
31
+ readonly folder: FontFolder;
32
+ /**
33
+ * The family name inside the subset files, e.g. "MathBlocks Math A". The
34
+ * subsets are modified versions of the original font, so they're renamed,
35
+ * as the fonts' licences require or ask.
36
+ */
37
+ readonly family: string;
38
+ /**
39
+ * The file name of the original font the subsets were made from, e.g.
40
+ * "STIX2Math.otf". The original isn't included in this package.
41
+ */
42
+ readonly source: string;
43
+ /** The licence the font, and so its subsets, are distributed under. */
44
+ readonly license: FontLicense;
45
+ /** The path of the licence's text inside this package. */
46
+ readonly licenseFile: string;
47
+ };
48
+ /**
49
+ * Every font whose subsets this package ships. src/fonts.json is the one list
50
+ * of fonts: scripts/subset-fonts.py builds the subsets from it, and the tests
51
+ * and demo read it too.
52
+ */
53
+ export declare const fonts: readonly MathFont[];
54
+ /** Returns the font whose subsets are in `subsets/<folder>/`, if any. */
55
+ export declare const getFont: (folder: string) => MathFont | undefined;
56
+ /**
57
+ * Returns the path of a subset file inside this package, such as
58
+ * `subsets/stix-two-math/base.woff`. `group` is a glyph group's name from
59
+ * `glyphGroups` in `@math-blocks/opentype`.
60
+ *
61
+ * The subsets are WOFF 1.0 files, which `@math-blocks/opentype` reads
62
+ * wherever `DecompressionStream` is available (current browsers and Node 18+).
63
+ *
64
+ * Resolve the path against the installed package, e.g. with
65
+ * `require.resolve(`@math-blocks/fonts/${subsetPath(...)}`)` in Node, or copy
66
+ * the package's `subsets/` folder to a static host and load it with
67
+ * `fromBaseUrl`.
68
+ */
69
+ export declare const subsetPath: (folder: FontFolder, group: string) => string;
70
+ export type { FontFolder, FontLicense, MathFont };
package/dist/index.js ADDED
@@ -0,0 +1,114 @@
1
+ // src/fonts.json
2
+ var fonts$1 = [
3
+ {
4
+ "name": "STIX Two Math",
5
+ "folder": "stix-two-math",
6
+ "source": "STIX2Math.otf",
7
+ "letter": "A",
8
+ "license": "OFL-1.1"
9
+ },
10
+ {
11
+ "name": "Latin Modern Math",
12
+ "folder": "latin-modern-math",
13
+ "source": "latinmodern-math.otf",
14
+ "letter": "B",
15
+ "license": "GUST-Font-License"
16
+ },
17
+ {
18
+ "name": "TeX Gyre Bonum Math",
19
+ "folder": "tex-gyre-bonum-math",
20
+ "source": "texgyrebonum-math.otf",
21
+ "letter": "C",
22
+ "license": "GUST-Font-License"
23
+ },
24
+ {
25
+ "name": "TeX Gyre Pagella Math",
26
+ "folder": "tex-gyre-pagella-math",
27
+ "source": "texgyrepagella-math.otf",
28
+ "letter": "D",
29
+ "license": "GUST-Font-License"
30
+ },
31
+ {
32
+ "name": "TeX Gyre Schola Math",
33
+ "folder": "tex-gyre-schola-math",
34
+ "source": "texgyreschola-math.otf",
35
+ "letter": "E",
36
+ "license": "GUST-Font-License"
37
+ },
38
+ {
39
+ "name": "TeX Gyre Termes Math",
40
+ "folder": "tex-gyre-termes-math",
41
+ "source": "texgyretermes-math.otf",
42
+ "letter": "F",
43
+ "license": "GUST-Font-License"
44
+ },
45
+ {
46
+ "name": "Pennstander Math",
47
+ "folder": "pennstander-math",
48
+ "source": "PennstanderMathVF.ttf",
49
+ "letter": "G",
50
+ "license": "OFL-1.1"
51
+ }
52
+ ];
53
+ // src/fonts.generated.ts
54
+ /** The folder in `subsets/` of each font in fonts.json, in order. */
55
+ const FONT_FOLDERS = [
56
+ "stix-two-math",
57
+ "latin-modern-math",
58
+ "tex-gyre-bonum-math",
59
+ "tex-gyre-pagella-math",
60
+ "tex-gyre-schola-math",
61
+ "tex-gyre-termes-math",
62
+ "pennstander-math"
63
+ ];
64
+ // src/font-list.ts
65
+ /** Returns true if `folder` is the folder of a font this package ships. */
66
+ const isFontFolder = (folder) => FONT_FOLDERS.includes(folder);
67
+ const LICENSE_FILES = {
68
+ "OFL-1.1": "licenses/OFL-1.1.txt",
69
+ "GUST-Font-License": "licenses/GUST-FONT-LICENSE.txt"
70
+ };
71
+ const isLicense = (license) => Object.prototype.hasOwnProperty.call(LICENSE_FILES, license);
72
+ /**
73
+ * Turns an entry in fonts.json into a MathFont, checking its licence and
74
+ * folder, since TypeScript reads both from the JSON as plain strings.
75
+ */
76
+ const toMathFont = (font) => {
77
+ if (!isLicense(font.license)) throw new Error(`Unknown licence for ${font.name}: ${font.license}`);
78
+ if (!isFontFolder(font.folder)) throw new Error(`${font.folder} isn't in fonts.generated.ts; run scripts/subset-fonts.py`);
79
+ return {
80
+ name: font.name,
81
+ folder: font.folder,
82
+ family: `MathBlocks Math ${font.letter}`,
83
+ source: font.source,
84
+ license: font.license,
85
+ licenseFile: LICENSE_FILES[font.license]
86
+ };
87
+ };
88
+ // src/index.ts
89
+ /**
90
+ * Every font whose subsets this package ships. src/fonts.json is the one list
91
+ * of fonts: scripts/subset-fonts.py builds the subsets from it, and the tests
92
+ * and demo read it too.
93
+ */
94
+ const fonts = fonts$1.map(toMathFont);
95
+ /** Returns the font whose subsets are in `subsets/<folder>/`, if any. */
96
+ const getFont = (folder) => fonts.find((font) => font.folder === folder);
97
+ /**
98
+ * Returns the path of a subset file inside this package, such as
99
+ * `subsets/stix-two-math/base.woff`. `group` is a glyph group's name from
100
+ * `glyphGroups` in `@math-blocks/opentype`.
101
+ *
102
+ * The subsets are WOFF 1.0 files, which `@math-blocks/opentype` reads
103
+ * wherever `DecompressionStream` is available (current browsers and Node 18+).
104
+ *
105
+ * Resolve the path against the installed package, e.g. with
106
+ * `require.resolve(`@math-blocks/fonts/${subsetPath(...)}`)` in Node, or copy
107
+ * the package's `subsets/` folder to a static host and load it with
108
+ * `fromBaseUrl`.
109
+ */
110
+ const subsetPath = (folder, group) => {
111
+ if (!isFontFolder(folder)) throw new Error(`Unknown font folder: "${String(folder)}"`);
112
+ return `subsets/${folder}/${group}.woff`;
113
+ };
114
+ export { FONT_FOLDERS, fonts, getFont, isFontFolder, subsetPath };
@@ -0,0 +1,28 @@
1
+ This is version 1.0, dated 22 June 2009, of the GUST Font License.
2
+ (GUST is the Polish TeX Users Group, http://www.gust.org.pl)
3
+
4
+ For the most recent version of this license see
5
+ http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
6
+ or
7
+ http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
8
+
9
+ This work may be distributed and/or modified under the conditions
10
+ of the LaTeX Project Public License, either version 1.3c of this
11
+ license or (at your option) any later version.
12
+
13
+ Please also observe the following clause:
14
+ 1) it is requested, but not legally required, that derived works be
15
+ distributed only after changing the names of the fonts comprising this
16
+ work and given in an accompanying "manifest", and that the
17
+ files comprising the Work, as listed in the manifest, also be given
18
+ new names. Any exceptions to this request are also given in the
19
+ manifest.
20
+
21
+ We recommend the manifest be given in a separate file named
22
+ MANIFEST-<fontid>.txt, where <fontid> is some unique identification
23
+ of the font family. If a separate "readme" file accompanies the Work,
24
+ we recommend a name of the form README-<fontid>.txt.
25
+
26
+ The latest version of the LaTeX Project Public License is in
27
+ http://www.latex-project.org/lppl.txt and version 1.3c or later
28
+ is part of all distributions of LaTeX version 2006/05/20 or later.
@@ -0,0 +1,415 @@
1
+ The LaTeX Project Public License
2
+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3
+
4
+ LPPL Version 1.3c 2008-05-04
5
+
6
+ Copyright 1999 2002-2008 LaTeX3 Project
7
+ Everyone is allowed to distribute verbatim copies of this
8
+ license document, but modification of it is not allowed.
9
+
10
+
11
+ PREAMBLE
12
+ ========
13
+
14
+ The LaTeX Project Public License (LPPL) is the primary license under
15
+ which the LaTeX kernel and the base LaTeX packages are distributed.
16
+
17
+ You may use this license for any work of which you hold the copyright
18
+ and which you wish to distribute. This license may be particularly
19
+ suitable if your work is TeX-related (such as a LaTeX package), but
20
+ it is written in such a way that you can use it even if your work is
21
+ unrelated to TeX.
22
+
23
+ The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
24
+ below, gives instructions, examples, and recommendations for authors
25
+ who are considering distributing their works under this license.
26
+
27
+ This license gives conditions under which a work may be distributed
28
+ and modified, as well as conditions under which modified versions of
29
+ that work may be distributed.
30
+
31
+ We, the LaTeX3 Project, believe that the conditions below give you
32
+ the freedom to make and distribute modified versions of your work
33
+ that conform with whatever technical specifications you wish while
34
+ maintaining the availability, integrity, and reliability of
35
+ that work. If you do not see how to achieve your goal while
36
+ meeting these conditions, then read the document `cfgguide.tex'
37
+ and `modguide.tex' in the base LaTeX distribution for suggestions.
38
+
39
+
40
+ DEFINITIONS
41
+ ===========
42
+
43
+ In this license document the following terms are used:
44
+
45
+ `Work'
46
+ Any work being distributed under this License.
47
+
48
+ `Derived Work'
49
+ Any work that under any applicable law is derived from the Work.
50
+
51
+ `Modification'
52
+ Any procedure that produces a Derived Work under any applicable
53
+ law -- for example, the production of a file containing an
54
+ original file associated with the Work or a significant portion of
55
+ such a file, either verbatim or with modifications and/or
56
+ translated into another language.
57
+
58
+ `Modify'
59
+ To apply any procedure that produces a Derived Work under any
60
+ applicable law.
61
+
62
+ `Distribution'
63
+ Making copies of the Work available from one person to another, in
64
+ whole or in part. Distribution includes (but is not limited to)
65
+ making any electronic components of the Work accessible by
66
+ file transfer protocols such as FTP or HTTP or by shared file
67
+ systems such as Sun's Network File System (NFS).
68
+
69
+ `Compiled Work'
70
+ A version of the Work that has been processed into a form where it
71
+ is directly usable on a computer system. This processing may
72
+ include using installation facilities provided by the Work,
73
+ transformations of the Work, copying of components of the Work, or
74
+ other activities. Note that modification of any installation
75
+ facilities provided by the Work constitutes modification of the Work.
76
+
77
+ `Current Maintainer'
78
+ A person or persons nominated as such within the Work. If there is
79
+ no such explicit nomination then it is the `Copyright Holder' under
80
+ any applicable law.
81
+
82
+ `Base Interpreter'
83
+ A program or process that is normally needed for running or
84
+ interpreting a part or the whole of the Work.
85
+
86
+ A Base Interpreter may depend on external components but these
87
+ are not considered part of the Base Interpreter provided that each
88
+ external component clearly identifies itself whenever it is used
89
+ interactively. Unless explicitly specified when applying the
90
+ license to the Work, the only applicable Base Interpreter is a
91
+ `LaTeX-Format' or in the case of files belonging to the
92
+ `LaTeX-format' a program implementing the `TeX language'.
93
+
94
+
95
+
96
+ CONDITIONS ON DISTRIBUTION AND MODIFICATION
97
+ ===========================================
98
+
99
+ 1. Activities other than distribution and/or modification of the Work
100
+ are not covered by this license; they are outside its scope. In
101
+ particular, the act of running the Work is not restricted and no
102
+ requirements are made concerning any offers of support for the Work.
103
+
104
+ 2. You may distribute a complete, unmodified copy of the Work as you
105
+ received it. Distribution of only part of the Work is considered
106
+ modification of the Work, and no right to distribute such a Derived
107
+ Work may be assumed under the terms of this clause.
108
+
109
+ 3. You may distribute a Compiled Work that has been generated from a
110
+ complete, unmodified copy of the Work as distributed under Clause 2
111
+ above, as long as that Compiled Work is distributed in such a way that
112
+ the recipients may install the Compiled Work on their system exactly
113
+ as it would have been installed if they generated a Compiled Work
114
+ directly from the Work.
115
+
116
+ 4. If you are the Current Maintainer of the Work, you may, without
117
+ restriction, modify the Work, thus creating a Derived Work. You may
118
+ also distribute the Derived Work without restriction, including
119
+ Compiled Works generated from the Derived Work. Derived Works
120
+ distributed in this manner by the Current Maintainer are considered to
121
+ be updated versions of the Work.
122
+
123
+ 5. If you are not the Current Maintainer of the Work, you may modify
124
+ your copy of the Work, thus creating a Derived Work based on the Work,
125
+ and compile this Derived Work, thus creating a Compiled Work based on
126
+ the Derived Work.
127
+
128
+ 6. If you are not the Current Maintainer of the Work, you may
129
+ distribute a Derived Work provided the following conditions are met
130
+ for every component of the Work unless that component clearly states
131
+ in the copyright notice that it is exempt from that condition. Only
132
+ the Current Maintainer is allowed to add such statements of exemption
133
+ to a component of the Work.
134
+
135
+ a. If a component of this Derived Work can be a direct replacement
136
+ for a component of the Work when that component is used with the
137
+ Base Interpreter, then, wherever this component of the Work
138
+ identifies itself to the user when used interactively with that
139
+ Base Interpreter, the replacement component of this Derived Work
140
+ clearly and unambiguously identifies itself as a modified version
141
+ of this component to the user when used interactively with that
142
+ Base Interpreter.
143
+
144
+ b. Every component of the Derived Work contains prominent notices
145
+ detailing the nature of the changes to that component, or a
146
+ prominent reference to another file that is distributed as part
147
+ of the Derived Work and that contains a complete and accurate log
148
+ of the changes.
149
+
150
+ c. No information in the Derived Work implies that any persons,
151
+ including (but not limited to) the authors of the original version
152
+ of the Work, provide any support, including (but not limited to)
153
+ the reporting and handling of errors, to recipients of the
154
+ Derived Work unless those persons have stated explicitly that
155
+ they do provide such support for the Derived Work.
156
+
157
+ d. You distribute at least one of the following with the Derived Work:
158
+
159
+ 1. A complete, unmodified copy of the Work;
160
+ if your distribution of a modified component is made by
161
+ offering access to copy the modified component from a
162
+ designated place, then offering equivalent access to copy
163
+ the Work from the same or some similar place meets this
164
+ condition, even though third parties are not compelled to
165
+ copy the Work along with the modified component;
166
+
167
+ 2. Information that is sufficient to obtain a complete,
168
+ unmodified copy of the Work.
169
+
170
+ 7. If you are not the Current Maintainer of the Work, you may
171
+ distribute a Compiled Work generated from a Derived Work, as long as
172
+ the Derived Work is distributed to all recipients of the Compiled
173
+ Work, and as long as the conditions of Clause 6, above, are met with
174
+ regard to the Derived Work.
175
+
176
+ 8. The conditions above are not intended to prohibit, and hence do not
177
+ apply to, the modification, by any method, of any component so that it
178
+ becomes identical to an updated version of that component of the Work as
179
+ it is distributed by the Current Maintainer under Clause 4, above.
180
+
181
+ 9. Distribution of the Work or any Derived Work in an alternative
182
+ format, where the Work or that Derived Work (in whole or in part) is
183
+ then produced by applying some process to that format, does not relax or
184
+ nullify any sections of this license as they pertain to the results of
185
+ applying that process.
186
+
187
+ 10. a. A Derived Work may be distributed under a different license
188
+ provided that license itself honors the conditions listed in
189
+ Clause 6 above, in regard to the Work, though it does not have
190
+ to honor the rest of the conditions in this license.
191
+
192
+ b. If a Derived Work is distributed under a different license, that
193
+ Derived Work must provide sufficient documentation as part of
194
+ itself to allow each recipient of that Derived Work to honor the
195
+ restrictions in Clause 6 above, concerning changes from the Work.
196
+
197
+ 11. This license places no restrictions on works that are unrelated to
198
+ the Work, nor does this license place any restrictions on aggregating
199
+ such works with the Work by any means.
200
+
201
+ 12. Nothing in this license is intended to, or may be used to, prevent
202
+ complete compliance by all parties with all applicable laws.
203
+
204
+
205
+ NO WARRANTY
206
+ ===========
207
+
208
+ There is no warranty for the Work. Except when otherwise stated in
209
+ writing, the Copyright Holder provides the Work `as is', without
210
+ warranty of any kind, either expressed or implied, including, but not
211
+ limited to, the implied warranties of merchantability and fitness for a
212
+ particular purpose. The entire risk as to the quality and performance
213
+ of the Work is with you. Should the Work prove defective, you assume
214
+ the cost of all necessary servicing, repair, or correction.
215
+
216
+ In no event unless required by applicable law or agreed to in writing
217
+ will The Copyright Holder, or any author named in the components of the
218
+ Work, or any other party who may distribute and/or modify the Work as
219
+ permitted above, be liable to you for damages, including any general,
220
+ special, incidental or consequential damages arising out of any use of
221
+ the Work or out of inability to use the Work (including, but not limited
222
+ to, loss of data, data being rendered inaccurate, or losses sustained by
223
+ anyone as a result of any failure of the Work to operate with any other
224
+ programs), even if the Copyright Holder or said author or said other
225
+ party has been advised of the possibility of such damages.
226
+
227
+
228
+ MAINTENANCE OF THE WORK
229
+ =======================
230
+
231
+ The Work has the status `author-maintained' if the Copyright Holder
232
+ explicitly and prominently states near the primary copyright notice in
233
+ the Work that the Work can only be maintained by the Copyright Holder
234
+ or simply that it is `author-maintained'.
235
+
236
+ The Work has the status `maintained' if there is a Current Maintainer
237
+ who has indicated in the Work that they are willing to receive error
238
+ reports for the Work (for example, by supplying a valid e-mail
239
+ address). It is not required for the Current Maintainer to acknowledge
240
+ or act upon these error reports.
241
+
242
+ The Work changes from status `maintained' to `unmaintained' if there
243
+ is no Current Maintainer, or the person stated to be Current
244
+ Maintainer of the work cannot be reached through the indicated means
245
+ of communication for a period of six months, and there are no other
246
+ significant signs of active maintenance.
247
+
248
+ You can become the Current Maintainer of the Work by agreement with
249
+ any existing Current Maintainer to take over this role.
250
+
251
+ If the Work is unmaintained, you can become the Current Maintainer of
252
+ the Work through the following steps:
253
+
254
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
255
+ the Copyright Holder, if the two differ) through the means of
256
+ an Internet or similar search.
257
+
258
+ 2. If this search is successful, then enquire whether the Work
259
+ is still maintained.
260
+
261
+ a. If it is being maintained, then ask the Current Maintainer
262
+ to update their communication data within one month.
263
+
264
+ b. If the search is unsuccessful or no action to resume active
265
+ maintenance is taken by the Current Maintainer, then announce
266
+ within the pertinent community your intention to take over
267
+ maintenance. (If the Work is a LaTeX work, this could be
268
+ done, for example, by posting to comp.text.tex.)
269
+
270
+ 3a. If the Current Maintainer is reachable and agrees to pass
271
+ maintenance of the Work to you, then this takes effect
272
+ immediately upon announcement.
273
+
274
+ b. If the Current Maintainer is not reachable and the Copyright
275
+ Holder agrees that maintenance of the Work be passed to you,
276
+ then this takes effect immediately upon announcement.
277
+
278
+ 4. If you make an `intention announcement' as described in 2b. above
279
+ and after three months your intention is challenged neither by
280
+ the Current Maintainer nor by the Copyright Holder nor by other
281
+ people, then you may arrange for the Work to be changed so as
282
+ to name you as the (new) Current Maintainer.
283
+
284
+ 5. If the previously unreachable Current Maintainer becomes
285
+ reachable once more within three months of a change completed
286
+ under the terms of 3b) or 4), then that Current Maintainer must
287
+ become or remain the Current Maintainer upon request provided
288
+ they then update their communication data within one month.
289
+
290
+ A change in the Current Maintainer does not, of itself, alter the fact
291
+ that the Work is distributed under the LPPL license.
292
+
293
+ If you become the Current Maintainer of the Work, you should
294
+ immediately provide, within the Work, a prominent and unambiguous
295
+ statement of your status as Current Maintainer. You should also
296
+ announce your new status to the same pertinent community as
297
+ in 2b) above.
298
+
299
+
300
+ WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
301
+ ======================================================
302
+
303
+ This section contains important instructions, examples, and
304
+ recommendations for authors who are considering distributing their
305
+ works under this license. These authors are addressed as `you' in
306
+ this section.
307
+
308
+ Choosing This License or Another License
309
+ ----------------------------------------
310
+
311
+ If for any part of your work you want or need to use *distribution*
312
+ conditions that differ significantly from those in this license, then
313
+ do not refer to this license anywhere in your work but, instead,
314
+ distribute your work under a different license. You may use the text
315
+ of this license as a model for your own license, but your license
316
+ should not refer to the LPPL or otherwise give the impression that
317
+ your work is distributed under the LPPL.
318
+
319
+ The document `modguide.tex' in the base LaTeX distribution explains
320
+ the motivation behind the conditions of this license. It explains,
321
+ for example, why distributing LaTeX under the GNU General Public
322
+ License (GPL) was considered inappropriate. Even if your work is
323
+ unrelated to LaTeX, the discussion in `modguide.tex' may still be
324
+ relevant, and authors intending to distribute their works under any
325
+ license are encouraged to read it.
326
+
327
+ A Recommendation on Modification Without Distribution
328
+ -----------------------------------------------------
329
+
330
+ It is wise never to modify a component of the Work, even for your own
331
+ personal use, without also meeting the above conditions for
332
+ distributing the modified component. While you might intend that such
333
+ modifications will never be distributed, often this will happen by
334
+ accident -- you may forget that you have modified that component; or
335
+ it may not occur to you when allowing others to access the modified
336
+ version that you are thus distributing it and violating the conditions
337
+ of this license in ways that could have legal implications and, worse,
338
+ cause problems for the community. It is therefore usually in your
339
+ best interest to keep your copy of the Work identical with the public
340
+ one. Many works provide ways to control the behavior of that work
341
+ without altering any of its licensed components.
342
+
343
+ How to Use This License
344
+ -----------------------
345
+
346
+ To use this license, place in each of the components of your work both
347
+ an explicit copyright notice including your name and the year the work
348
+ was authored and/or last substantially modified. Include also a
349
+ statement that the distribution and/or modification of that
350
+ component is constrained by the conditions in this license.
351
+
352
+ Here is an example of such a notice and statement:
353
+
354
+ %% pig.dtx
355
+ %% Copyright 2005 M. Y. Name
356
+ %
357
+ % This work may be distributed and/or modified under the
358
+ % conditions of the LaTeX Project Public License, either version 1.3
359
+ % of this license or (at your option) any later version.
360
+ % The latest version of this license is in
361
+ % https://www.latex-project.org/lppl.txt
362
+ % and version 1.3 or later is part of all distributions of LaTeX
363
+ % version 2005/12/01 or later.
364
+ %
365
+ % This work has the LPPL maintenance status `maintained'.
366
+ %
367
+ % The Current Maintainer of this work is M. Y. Name.
368
+ %
369
+ % This work consists of the files pig.dtx and pig.ins
370
+ % and the derived file pig.sty.
371
+
372
+ Given such a notice and statement in a file, the conditions
373
+ given in this license document would apply, with the `Work' referring
374
+ to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
375
+ generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
376
+ referring to any `LaTeX-Format', and both `Copyright Holder' and
377
+ `Current Maintainer' referring to the person `M. Y. Name'.
378
+
379
+ If you do not want the Maintenance section of LPPL to apply to your
380
+ Work, change `maintained' above into `author-maintained'.
381
+ However, we recommend that you use `maintained', as the Maintenance
382
+ section was added in order to ensure that your Work remains useful to
383
+ the community even when you can no longer maintain and support it
384
+ yourself.
385
+
386
+ Derived Works That Are Not Replacements
387
+ ---------------------------------------
388
+
389
+ Several clauses of the LPPL specify means to provide reliability and
390
+ stability for the user community. They therefore concern themselves
391
+ with the case that a Derived Work is intended to be used as a
392
+ (compatible or incompatible) replacement of the original Work. If
393
+ this is not the case (e.g., if a few lines of code are reused for a
394
+ completely different task), then clauses 6b and 6d shall not apply.
395
+
396
+
397
+ Important Recommendations
398
+ -------------------------
399
+
400
+ Defining What Constitutes the Work
401
+
402
+ The LPPL requires that distributions of the Work contain all the
403
+ files of the Work. It is therefore important that you provide a
404
+ way for the licensee to determine which files constitute the Work.
405
+ This could, for example, be achieved by explicitly listing all the
406
+ files of the Work near the copyright notice of each file or by
407
+ using a line such as:
408
+
409
+ % This work consists of all files listed in manifest.txt.
410
+
411
+ in that place. In the absence of an unequivocal list it might be
412
+ impossible for the licensee to determine what is considered by you
413
+ to comprise the Work and, in such a case, the licensee would be
414
+ entitled to make reasonable conjectures as to which files comprise
415
+ the Work.
@@ -0,0 +1,108 @@
1
+ STIX Two Math:
2
+
3
+ Copyright (c) 2001-2016 by the STI Pub Companies, consisting of the American
4
+ Chemical Society, the American Institute of Physics, the American Mathematical
5
+ Society, the American Physical Society, Elsevier, Inc., and The Institute of
6
+ Electrical and Electronic Engineers, Inc. Portions copyright (c) 1998-2003 by
7
+ MicroPress, Inc. Portions copyright (c) 1990 by Elsevier, Inc. All rights
8
+ reserved. Portions copyright (c) Copyright 2010, 2012, 2014 Adobe Systems
9
+ Incorporated.
10
+
11
+ STIX Fonts(TM) is a trademark of The Institute of Electrical and Electronics
12
+ Engineers, Inc.
13
+
14
+ Pennstander Math:
15
+
16
+ Copyright 2020 The Grandstander Project Authors (https://github.com/Etcetera-Type-Co/Grandstander)
17
+ Copyright 2024 Julius Ross
18
+
19
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
20
+ This license is copied below, and is also available with a FAQ at:
21
+ http://scripts.sil.org/OFL
22
+
23
+ -----------------------------------------------------------
24
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
25
+ -----------------------------------------------------------
26
+
27
+ PREAMBLE
28
+ The goals of the Open Font License (OFL) are to stimulate worldwide
29
+ development of collaborative font projects, to support the font creation
30
+ efforts of academic and linguistic communities, and to provide a free and
31
+ open framework in which fonts may be shared and improved in partnership
32
+ with others.
33
+
34
+ The OFL allows the licensed fonts to be used, studied, modified and
35
+ redistributed freely as long as they are not sold by themselves. The
36
+ fonts, including any derivative works, can be bundled, embedded,
37
+ redistributed and/or sold with any software provided that any reserved
38
+ names are not used by derivative works. The fonts and derivatives,
39
+ however, cannot be released under any other type of license. The
40
+ requirement for fonts to remain under this license does not apply
41
+ to any document created using the fonts or their derivatives.
42
+
43
+ DEFINITIONS
44
+ "Font Software" refers to the set of files released by the Copyright
45
+ Holder(s) under this license and clearly marked as such. This may
46
+ include source files, build scripts and documentation.
47
+
48
+ "Reserved Font Name" refers to any names specified as such after the
49
+ copyright statement(s).
50
+
51
+ "Original Version" refers to the collection of Font Software components as
52
+ distributed by the Copyright Holder(s).
53
+
54
+ "Modified Version" refers to any derivative made by adding to, deleting,
55
+ or substituting -- in part or in whole -- any of the components of the
56
+ Original Version, by changing formats or by porting the Font Software to a
57
+ new environment.
58
+
59
+ "Author" refers to any designer, engineer, programmer, technical
60
+ writer or other person who contributed to the Font Software.
61
+
62
+ PERMISSION & CONDITIONS
63
+ Permission is hereby granted, free of charge, to any person obtaining
64
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
65
+ redistribute, and sell modified and unmodified copies of the Font
66
+ Software, subject to the following conditions:
67
+
68
+ 1) Neither the Font Software nor any of its individual components,
69
+ in Original or Modified Versions, may be sold by itself.
70
+
71
+ 2) Original or Modified Versions of the Font Software may be bundled,
72
+ redistributed and/or sold with any software, provided that each copy
73
+ contains the above copyright notice and this license. These can be
74
+ included either as stand-alone text files, human-readable headers or
75
+ in the appropriate machine-readable metadata fields within text or
76
+ binary files as long as those fields can be easily viewed by the user.
77
+
78
+ 3) No Modified Version of the Font Software may use the Reserved Font
79
+ Name(s) unless explicit written permission is granted by the corresponding
80
+ Copyright Holder. This restriction only applies to the primary font name as
81
+ presented to the users.
82
+
83
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
84
+ Software shall not be used to promote, endorse or advertise any
85
+ Modified Version, except to acknowledge the contribution(s) of the
86
+ Copyright Holder(s) and the Author(s) or with their explicit written
87
+ permission.
88
+
89
+ 5) The Font Software, modified or unmodified, in part or in whole,
90
+ must be distributed entirely under this license, and must not be
91
+ distributed under any other license. The requirement for fonts to
92
+ remain under this license does not apply to any document created
93
+ using the Font Software.
94
+
95
+ TERMINATION
96
+ This license becomes null and void if any of the above conditions are
97
+ not met.
98
+
99
+ DISCLAIMER
100
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
101
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
102
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
103
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
104
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
105
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
106
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
107
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
108
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "@math-blocks/fonts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Math font subsets (WOFF) for rendering math with math-blocks",
5
+ "license": "MIT AND OFL-1.1 AND LPPL-1.3c",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/math-blocks/math-blocks.git",
9
+ "directory": "packages/fonts"
10
+ },
11
+ "bugs": "https://github.com/math-blocks/math-blocks/issues",
12
+ "homepage": "https://github.com/math-blocks/math-blocks/tree/main/packages/fonts#readme",
13
+ "type": "module",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./subsets/*": "./subsets/*",
22
+ "./licenses/*": "./licenses/*",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "subsets",
28
+ "licenses",
29
+ "LICENSE.md"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ }
6
34
  }
Binary file