quanta-strike 0.1.2

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/10.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-10";
14
+ src: url("fonts/quanta-strike-10-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-10-mono";
21
+ src: url("fonts/quanta-strike-10-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-10: "quanta-strike-10";
29
+ --font-strike-10-mono: "quanta-strike-10-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-10: "quanta-strike-10-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-10 { font-family: var(--font-strike-10); font-size: 10px; line-height: 1; }
39
+ .qs-10-mono { font-family: var(--font-strike-10-mono); font-size: 10px; line-height: 1; }
package/12.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-12";
14
+ src: url("fonts/quanta-strike-12-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-12-mono";
21
+ src: url("fonts/quanta-strike-12-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-12: "quanta-strike-12";
29
+ --font-strike-12-mono: "quanta-strike-12-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-12: "quanta-strike-12-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-12 { font-family: var(--font-strike-12); font-size: 12px; line-height: 1; }
39
+ .qs-12-mono { font-family: var(--font-strike-12-mono); font-size: 12px; line-height: 1; }
package/14.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-14";
14
+ src: url("fonts/quanta-strike-14-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-14-mono";
21
+ src: url("fonts/quanta-strike-14-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-14: "quanta-strike-14";
29
+ --font-strike-14-mono: "quanta-strike-14-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-14: "quanta-strike-14-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-14 { font-family: var(--font-strike-14); font-size: 14px; line-height: 1; }
39
+ .qs-14-mono { font-family: var(--font-strike-14-mono); font-size: 14px; line-height: 1; }
package/16.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-16";
14
+ src: url("fonts/quanta-strike-16-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-16-mono";
21
+ src: url("fonts/quanta-strike-16-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-16: "quanta-strike-16";
29
+ --font-strike-16-mono: "quanta-strike-16-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-16: "quanta-strike-16-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-16 { font-family: var(--font-strike-16); font-size: 16px; line-height: 1; }
39
+ .qs-16-mono { font-family: var(--font-strike-16-mono); font-size: 16px; line-height: 1; }
package/18.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-18";
14
+ src: url("fonts/quanta-strike-18-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-18-mono";
21
+ src: url("fonts/quanta-strike-18-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-18: "quanta-strike-18";
29
+ --font-strike-18-mono: "quanta-strike-18-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-18: "quanta-strike-18-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-18 { font-family: var(--font-strike-18); font-size: 18px; line-height: 1; }
39
+ .qs-18-mono { font-family: var(--font-strike-18-mono); font-size: 18px; line-height: 1; }
package/20.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-20";
14
+ src: url("fonts/quanta-strike-20-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-20-mono";
21
+ src: url("fonts/quanta-strike-20-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-20: "quanta-strike-20";
29
+ --font-strike-20-mono: "quanta-strike-20-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-20: "quanta-strike-20-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-20 { font-family: var(--font-strike-20); font-size: 20px; line-height: 1; }
39
+ .qs-20-mono { font-family: var(--font-strike-20-mono); font-size: 20px; line-height: 1; }
package/32.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-32";
14
+ src: url("fonts/quanta-strike-32-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-32-mono";
21
+ src: url("fonts/quanta-strike-32-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-32: "quanta-strike-32";
29
+ --font-strike-32-mono: "quanta-strike-32-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-32: "quanta-strike-32-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-32 { font-family: var(--font-strike-32); font-size: 32px; line-height: 1; }
39
+ .qs-32-mono { font-family: var(--font-strike-32-mono); font-size: 32px; line-height: 1; }
package/6.css ADDED
@@ -0,0 +1,39 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-6";
14
+ src: url("fonts/quanta-strike-6-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-6-mono";
21
+ src: url("fonts/quanta-strike-6-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+
27
+ :root {
28
+ --font-strike-6: "quanta-strike-6";
29
+ --font-strike-6-mono: "quanta-strike-6-mono";
30
+ }
31
+
32
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
33
+ .qs-mono {
34
+ --font-strike-6: "quanta-strike-6-mono";
35
+ }
36
+
37
+ /* Family and size together. Never split them. */
38
+ .qs-6 { font-family: var(--font-strike-6); font-size: 6px; line-height: 1; }
39
+ .qs-6-mono { font-family: var(--font-strike-6-mono); font-size: 6px; line-height: 1; }
package/OFL.txt ADDED
@@ -0,0 +1,93 @@
1
+ Copyright 2026 The quanta-strike Project Authors (https://dithernaut.com)
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.
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # quanta-strike
2
+
3
+ <img src="https://raw.githubusercontent.com/dithernaut/quanta-strike/main/docs/quanta-strike.png" alt="quanta-strike shown at different strike sizes" width="100%">
4
+
5
+ A modern pixel typeface. I draw each size by hand. Pixels shouldn't be scaled by non-integer factors. That's why quanta-strike ships a familty of _strikes_. Each strike is
6
+ its own pixel design, drawn for one target size.
7
+
8
+ 📖 **Read the story:** [dithernaut.com/posts/pixel-scaling](https://dithernaut.com/posts/pixel-scaling)
9
+
10
+ ![All the available strikes of `quanta-strike`](https://raw.githubusercontent.com/dithernaut/quanta-strike/main/docs/quanta-strikes.avif)
11
+
12
+ ```bash
13
+ npm install quanta-strike
14
+ ```
15
+
16
+ ## Use it
17
+
18
+ Import the CSS, then use the class.
19
+
20
+ ```js
21
+ import "quanta-strike";
22
+ ```
23
+
24
+ ```html
25
+ <p class="qs-16">Sharp at sixteen pixels.</p>
26
+ <code class="qs-12-mono">const pixel = 1;</code>
27
+ ```
28
+
29
+ That is the whole setup. The class sets the family and the size together.
30
+
31
+ Import one size instead of all eight if you only need one:
32
+
33
+ ```js
34
+ import "quanta-strike/16.css";
35
+ ```
36
+
37
+ ## Sizes
38
+
39
+ The package ships eight strikes: `6`, `10`, `12`, `14`, `16`, `18`, `20`, `32`.
40
+
41
+ Each strike gets two classes.
42
+
43
+ | class | use for |
44
+ | ------------- | ------------------ |
45
+ | `.qs-16` | body text and UI |
46
+ | `.qs-16-mono` | code and terminals |
47
+
48
+ Swap the number for any size in the list.
49
+
50
+ ## The one rule
51
+
52
+ The size and the family go together. `quanta-strike-16` is sharp at 16px and
53
+ blurry everywhere else. The `.qs-16` class binds both, so use the class and you
54
+ stay safe.
55
+
56
+ If you write your own CSS, keep them in the same rule:
57
+
58
+ ```css
59
+ .headline {
60
+ font-family: var(--font-strike-32);
61
+ font-size: 32px;
62
+ }
63
+ ```
64
+
65
+ Never set the size on its own. Never set the family on its own.
66
+
67
+ ## Responsive text
68
+
69
+ You cannot scale this font with `clamp()`. Change the size and you must change the
70
+ family too. So swap the whole class at a breakpoint:
71
+
72
+ ```css
73
+ .title {
74
+ font-family: var(--font-strike-16);
75
+ font-size: 16px;
76
+ }
77
+
78
+ @media (min-width: 48rem) {
79
+ .title {
80
+ font-family: var(--font-strike-32);
81
+ font-size: 32px;
82
+ }
83
+ }
84
+ ```
85
+
86
+ ## What you get
87
+
88
+ - `quanta-strike` loads every strike.
89
+ - `quanta-strike/16.css` loads one strike.
90
+ - `--font-strike-16` and `--font-strike-16-mono` custom properties for every size.
91
+ - `.qs-16` and `.qs-16-mono` classes for every size.
92
+
93
+ ## Licence
94
+
95
+ SIL Open Font License 1.1. See `OFL.txt`.
96
+
97
+ Read the full story at
98
+ [dithernaut.com/posts/pixel-scaling](https://dithernaut.com/posts/pixel-scaling).
99
+ Source and build pipeline at
100
+ [github.com/dithernaut/quanta-strike](https://github.com/dithernaut/quanta-strike).
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "quanta-strike",
3
+ "version": "0.1.2",
4
+ "description": "A pixel typeface with one font per size. Every strike is drawn by hand and stays sharp at the size it was drawn for.",
5
+ "keywords": [
6
+ "font",
7
+ "pixel-font",
8
+ "bitmap-font",
9
+ "typeface",
10
+ "webfont",
11
+ "woff2",
12
+ "pixel-art",
13
+ "monospace",
14
+ "css"
15
+ ],
16
+ "homepage": "https://github.com/dithernaut/quanta-strike#readme",
17
+ "bugs": "https://github.com/dithernaut/quanta-strike/issues",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/dithernaut/quanta-strike.git",
21
+ "directory": "package"
22
+ },
23
+ "author": "dithernaut (https://dithernaut.com)",
24
+ "license": "OFL-1.1",
25
+ "type": "module",
26
+ "sideEffects": [
27
+ "*.css"
28
+ ],
29
+ "exports": {
30
+ ".": "./quanta-strike.css",
31
+ "./quanta-strike.css": "./quanta-strike.css",
32
+ "./utilities.css": "./utilities.css",
33
+ "./6.css": "./6.css",
34
+ "./10.css": "./10.css",
35
+ "./12.css": "./12.css",
36
+ "./14.css": "./14.css",
37
+ "./16.css": "./16.css",
38
+ "./18.css": "./18.css",
39
+ "./20.css": "./20.css",
40
+ "./32.css": "./32.css",
41
+ "./fonts/*": "./fonts/*",
42
+ "./OFL.txt": "./OFL.txt",
43
+ "./package.json": "./package.json"
44
+ },
45
+ "files": [
46
+ "*.css",
47
+ "fonts/",
48
+ "OFL.txt",
49
+ "README.md"
50
+ ]
51
+ }
@@ -0,0 +1,154 @@
1
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
2
+ *
3
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
4
+ * size and blurry at any other, so the classes below set family and size together.
5
+ * Use them as a pair and never pull the size out on its own.
6
+ *
7
+ * <p class="qs-16">body text</p>
8
+ * <code class="qs-12-mono">code</code>
9
+ *
10
+ * https://github.com/dithernaut/quanta-strike
11
+ */
12
+ @font-face {
13
+ font-family: "quanta-strike-6";
14
+ src: url("fonts/quanta-strike-6-regular.woff2") format("woff2");
15
+ font-weight: normal;
16
+ font-style: normal;
17
+ font-display: block;
18
+ }
19
+ @font-face {
20
+ font-family: "quanta-strike-6-mono";
21
+ src: url("fonts/quanta-strike-6-mono-regular.woff2") format("woff2");
22
+ font-weight: normal;
23
+ font-style: normal;
24
+ font-display: block;
25
+ }
26
+ @font-face {
27
+ font-family: "quanta-strike-10";
28
+ src: url("fonts/quanta-strike-10-regular.woff2") format("woff2");
29
+ font-weight: normal;
30
+ font-style: normal;
31
+ font-display: block;
32
+ }
33
+ @font-face {
34
+ font-family: "quanta-strike-10-mono";
35
+ src: url("fonts/quanta-strike-10-mono-regular.woff2") format("woff2");
36
+ font-weight: normal;
37
+ font-style: normal;
38
+ font-display: block;
39
+ }
40
+ @font-face {
41
+ font-family: "quanta-strike-12";
42
+ src: url("fonts/quanta-strike-12-regular.woff2") format("woff2");
43
+ font-weight: normal;
44
+ font-style: normal;
45
+ font-display: block;
46
+ }
47
+ @font-face {
48
+ font-family: "quanta-strike-12-mono";
49
+ src: url("fonts/quanta-strike-12-mono-regular.woff2") format("woff2");
50
+ font-weight: normal;
51
+ font-style: normal;
52
+ font-display: block;
53
+ }
54
+ @font-face {
55
+ font-family: "quanta-strike-14";
56
+ src: url("fonts/quanta-strike-14-regular.woff2") format("woff2");
57
+ font-weight: normal;
58
+ font-style: normal;
59
+ font-display: block;
60
+ }
61
+ @font-face {
62
+ font-family: "quanta-strike-14-mono";
63
+ src: url("fonts/quanta-strike-14-mono-regular.woff2") format("woff2");
64
+ font-weight: normal;
65
+ font-style: normal;
66
+ font-display: block;
67
+ }
68
+ @font-face {
69
+ font-family: "quanta-strike-16";
70
+ src: url("fonts/quanta-strike-16-regular.woff2") format("woff2");
71
+ font-weight: normal;
72
+ font-style: normal;
73
+ font-display: block;
74
+ }
75
+ @font-face {
76
+ font-family: "quanta-strike-16-mono";
77
+ src: url("fonts/quanta-strike-16-mono-regular.woff2") format("woff2");
78
+ font-weight: normal;
79
+ font-style: normal;
80
+ font-display: block;
81
+ }
82
+ @font-face {
83
+ font-family: "quanta-strike-18";
84
+ src: url("fonts/quanta-strike-18-regular.woff2") format("woff2");
85
+ font-weight: normal;
86
+ font-style: normal;
87
+ font-display: block;
88
+ }
89
+ @font-face {
90
+ font-family: "quanta-strike-18-mono";
91
+ src: url("fonts/quanta-strike-18-mono-regular.woff2") format("woff2");
92
+ font-weight: normal;
93
+ font-style: normal;
94
+ font-display: block;
95
+ }
96
+ @font-face {
97
+ font-family: "quanta-strike-20";
98
+ src: url("fonts/quanta-strike-20-regular.woff2") format("woff2");
99
+ font-weight: normal;
100
+ font-style: normal;
101
+ font-display: block;
102
+ }
103
+ @font-face {
104
+ font-family: "quanta-strike-20-mono";
105
+ src: url("fonts/quanta-strike-20-mono-regular.woff2") format("woff2");
106
+ font-weight: normal;
107
+ font-style: normal;
108
+ font-display: block;
109
+ }
110
+ @font-face {
111
+ font-family: "quanta-strike-32";
112
+ src: url("fonts/quanta-strike-32-regular.woff2") format("woff2");
113
+ font-weight: normal;
114
+ font-style: normal;
115
+ font-display: block;
116
+ }
117
+ @font-face {
118
+ font-family: "quanta-strike-32-mono";
119
+ src: url("fonts/quanta-strike-32-mono-regular.woff2") format("woff2");
120
+ font-weight: normal;
121
+ font-style: normal;
122
+ font-display: block;
123
+ }
124
+
125
+ :root {
126
+ --font-strike-6: "quanta-strike-6";
127
+ --font-strike-6-mono: "quanta-strike-6-mono";
128
+ --font-strike-10: "quanta-strike-10";
129
+ --font-strike-10-mono: "quanta-strike-10-mono";
130
+ --font-strike-12: "quanta-strike-12";
131
+ --font-strike-12-mono: "quanta-strike-12-mono";
132
+ --font-strike-14: "quanta-strike-14";
133
+ --font-strike-14-mono: "quanta-strike-14-mono";
134
+ --font-strike-16: "quanta-strike-16";
135
+ --font-strike-16-mono: "quanta-strike-16-mono";
136
+ --font-strike-18: "quanta-strike-18";
137
+ --font-strike-18-mono: "quanta-strike-18-mono";
138
+ --font-strike-20: "quanta-strike-20";
139
+ --font-strike-20-mono: "quanta-strike-20-mono";
140
+ --font-strike-32: "quanta-strike-32";
141
+ --font-strike-32-mono: "quanta-strike-32-mono";
142
+ }
143
+
144
+ /* Switch a subtree to the mono variant. Sizes stay exactly as they are. */
145
+ .qs-mono {
146
+ --font-strike-6: "quanta-strike-6-mono";
147
+ --font-strike-10: "quanta-strike-10-mono";
148
+ --font-strike-12: "quanta-strike-12-mono";
149
+ --font-strike-14: "quanta-strike-14-mono";
150
+ --font-strike-16: "quanta-strike-16-mono";
151
+ --font-strike-18: "quanta-strike-18-mono";
152
+ --font-strike-20: "quanta-strike-20-mono";
153
+ --font-strike-32: "quanta-strike-32-mono";
154
+ }
package/utilities.css ADDED
@@ -0,0 +1,31 @@
1
+ @import "./quanta-strike.css";
2
+
3
+ /* quanta-strike — generated by scripts/generate-css.py. Do not edit by hand.
4
+ *
5
+ * Each strike is its own family, drawn for one size. It is pixel-perfect at that
6
+ * size and blurry at any other, so the classes below set family and size together.
7
+ * Use them as a pair and never pull the size out on its own.
8
+ *
9
+ * <p class="qs-16">body text</p>
10
+ * <code class="qs-12-mono">code</code>
11
+ *
12
+ * https://github.com/dithernaut/quanta-strike
13
+ */
14
+
15
+ /* Family and size together. Never split them. */
16
+ .qs-6 { font-family: var(--font-strike-6); font-size: 6px; line-height: 1; }
17
+ .qs-6-mono { font-family: var(--font-strike-6-mono); font-size: 6px; line-height: 1; }
18
+ .qs-10 { font-family: var(--font-strike-10); font-size: 10px; line-height: 1; }
19
+ .qs-10-mono { font-family: var(--font-strike-10-mono); font-size: 10px; line-height: 1; }
20
+ .qs-12 { font-family: var(--font-strike-12); font-size: 12px; line-height: 1; }
21
+ .qs-12-mono { font-family: var(--font-strike-12-mono); font-size: 12px; line-height: 1; }
22
+ .qs-14 { font-family: var(--font-strike-14); font-size: 14px; line-height: 1; }
23
+ .qs-14-mono { font-family: var(--font-strike-14-mono); font-size: 14px; line-height: 1; }
24
+ .qs-16 { font-family: var(--font-strike-16); font-size: 16px; line-height: 1; }
25
+ .qs-16-mono { font-family: var(--font-strike-16-mono); font-size: 16px; line-height: 1; }
26
+ .qs-18 { font-family: var(--font-strike-18); font-size: 18px; line-height: 1; }
27
+ .qs-18-mono { font-family: var(--font-strike-18-mono); font-size: 18px; line-height: 1; }
28
+ .qs-20 { font-family: var(--font-strike-20); font-size: 20px; line-height: 1; }
29
+ .qs-20-mono { font-family: var(--font-strike-20-mono); font-size: 20px; line-height: 1; }
30
+ .qs-32 { font-family: var(--font-strike-32); font-size: 32px; line-height: 1; }
31
+ .qs-32-mono { font-family: var(--font-strike-32-mono); font-size: 32px; line-height: 1; }