subfont 7.2.0 → 7.2.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/CHANGELOG.md +18 -7
- package/README.md +1 -1
- package/lib/subsetFonts.js +4 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
### v7.2.2 (2026-03-21)
|
|
2
|
+
|
|
3
|
+
- [Drive-by: Add test for unicodeRange generation](https://github.com/Munter/subfont/commit/ae58ca03f846d5e95942875bf163f66d4c6cdb1c) ([Andreas Lind](mailto:andreas.lind@workday.com))
|
|
4
|
+
- [Fix extraction of codepoints from the page text in the presence of surrogate pairs](https://github.com/Munter/subfont/commit/5f29df4cdf59b1f903bee040ba896877776ec0c8) ([Andreas Lind](mailto:andreas.lind@workday.com))
|
|
5
|
+
|
|
6
|
+
### v7.2.1 (2024-05-08)
|
|
7
|
+
|
|
8
|
+
- [Update font-tracer to ^3.7.0, fixes \#173](https://github.com/Munter/subfont/commit/0fae200fe8156ab5ccbf632c765e75d65a240210) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
9
|
+
- [Update subset-font to ^2.3.0](https://github.com/Munter/subfont/commit/b5cd91e1a6d1baa92900f586c184b9501de4fe08) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
10
|
+
- [Update the "Subfont will" list](https://github.com/Munter/subfont/commit/277b500d1cf65e40975660666a8769dbf1f9cee0) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
11
|
+
|
|
1
12
|
### v7.2.0 (2024-03-24)
|
|
2
13
|
|
|
3
14
|
#### Pull requests
|
|
@@ -95,13 +106,9 @@
|
|
|
95
106
|
- [Update subset-font to ^1.5.0](https://github.com/Munter/subfont/commit/ba79ef6db81cedfd0e52672b530ca3afddd68a94) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
96
107
|
- [Fix warning about missing glyphs for BMP chars](https://github.com/Munter/subfont/commit/5ba0168f35bfef33f9bb9cc8a6d64de8fa1d5585) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
97
108
|
- [Fix CHANGELOG generation in preversion script](https://github.com/Munter/subfont/commit/3ea696f8c336c6072411c9817c0c2f5b8d8d61b9) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
98
|
-
|
|
99
|
-
### v6.6.1 (2022-07-09)
|
|
100
|
-
|
|
101
|
-
- [ugrvw](https://github.com/Munter/subfont/commit/5ccb873025f9790faf65641551df1a7e65fbfdbf) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
102
109
|
- [Fix CHANGELOG https:\/\/github.com\/Munter\/subfont\/commit\/5365689a5a925304a158fddef2b6af702857371c\#r78084394](https://github.com/Munter/subfont/commit/d42c7a2cffd33662d42d4532c45cb8b90080f128) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
103
110
|
- [Expect browserslist to only prescribe woff I guess the browser features + usage statistics finally changed so woff isn't needed](https://github.com/Munter/subfont/commit/b70db9b769955cabbda2f2a76f2e7758f9968ec7) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
104
|
-
- [
|
|
111
|
+
- [+1 more](https://github.com/Munter/subfont/compare/v6.6.0...v6.7.0)
|
|
105
112
|
|
|
106
113
|
### v6.6.0 (2022-07-09)
|
|
107
114
|
|
|
@@ -388,13 +395,16 @@
|
|
|
388
395
|
#### Pull requests
|
|
389
396
|
|
|
390
397
|
- [#76](https://github.com/Munter/subfont/pull/76) Fix the prettier setup ([Andreas Lind](mailto:andreas.lind@peakon.com))
|
|
391
|
-
- [#75](https://github.com/Munter/subfont/pull/75) Fix omitFallbacks with Google Web Fonts ([Andreas Lind](mailto:andreas.lind@peakon.com))
|
|
392
398
|
|
|
393
399
|
#### Commits to master
|
|
394
400
|
|
|
395
401
|
- [Switch to the official css-font-parser now that bramstein\/css-font-parser\#7 has been merged and released](https://github.com/Munter/subfont/commit/457c7f0e4cef0a8c1bd8f816c23ace64c9987424) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
396
402
|
- [Don't populate source map relations](https://github.com/Munter/subfont/commit/5c07218b6f1dcc6fad88702a3bcb7b33bf9df54e) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
397
403
|
|
|
404
|
+
### v4.1.2 (2020-01-09)
|
|
405
|
+
|
|
406
|
+
- [#75](https://github.com/Munter/subfont/pull/75) Fix omitFallbacks with Google Web Fonts ([Andreas Lind](mailto:andreas.lind@peakon.com))
|
|
407
|
+
|
|
398
408
|
### v4.1.1 (2020-01-04)
|
|
399
409
|
|
|
400
410
|
- [Add regression test](https://github.com/Munter/subfont/commit/46eddce9c09268dbde459b1f98fe5cec9e4c98f5) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
@@ -425,7 +435,8 @@
|
|
|
425
435
|
- [Add vscode debugger launch configuration for the test suite](https://github.com/Munter/subfont/commit/f8f9abc42909c556765555cc49f44eb40a9194db) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
426
436
|
- [Guard against an already detached relation when cleaning up](https://github.com/Munter/subfont/commit/6392fc359222772c9033a58a9020e3b35487d019) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
427
437
|
|
|
428
|
-
### v4.0.3
|
|
438
|
+
### v4.0.3 (2019-11-02)
|
|
439
|
+
|
|
429
440
|
#### Pull requests
|
|
430
441
|
|
|
431
442
|
- [#67](https://github.com/Munter/subfont/pull/67) Only warn about missing fonttools install if we are actually trying t… ([Peter Müller](mailto:munter@fumle.dk))
|
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@ Subfont will:
|
|
|
13
13
|
- Automatically figure out what characters are used from each font
|
|
14
14
|
- Warn you about usage of characters that don't exist as glyphs in your webfonts
|
|
15
15
|
- Create an exact subset of used characters of each font
|
|
16
|
+
- Reduce the variation space of variable fonts based on the actual usage (when the `--instance` switch is used)
|
|
16
17
|
- Generate web fonts in both `woff2` and `woff` formats
|
|
17
18
|
- Add preload hints for the subsets to reduce time to first meaningful paint
|
|
18
|
-
- Add JS font loading for browsers without preload support
|
|
19
19
|
- Give the subsetted fonts new names and prepend them in front of the original fonts in your `font-family` definitions (enables missing glyph fallback)
|
|
20
20
|
- Async load your original `@font-face` declaring CSS at the bottom of your page, moving it off the critical path
|
|
21
21
|
|
package/lib/subsetFonts.js
CHANGED
|
@@ -710,7 +710,10 @@ const validFontDisplayValues = [
|
|
|
710
710
|
];
|
|
711
711
|
|
|
712
712
|
function getCodepoints(text) {
|
|
713
|
-
const codepoints =
|
|
713
|
+
const codepoints = [];
|
|
714
|
+
for (const c of text) {
|
|
715
|
+
codepoints.push(c.codePointAt(0));
|
|
716
|
+
}
|
|
714
717
|
|
|
715
718
|
if (!codepoints.includes(32)) {
|
|
716
719
|
// Make sure that space is always part of the subset fonts (and that it's announced in unicode-range).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "subfont",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.2",
|
|
4
4
|
"description": "Speeds up your pages initial paint by automatically subsetting local or Google fonts and loading them optimally",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=10.0.0"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"css-font-weight-names": "^0.2.1",
|
|
55
55
|
"css-list-helpers": "^2.0.0",
|
|
56
56
|
"font-snapper": "^1.2.0",
|
|
57
|
-
"font-tracer": "^3.
|
|
57
|
+
"font-tracer": "^3.7.0",
|
|
58
58
|
"fontverter": "^2.0.0",
|
|
59
59
|
"gettemporaryfilepath": "^1.0.1",
|
|
60
60
|
"harfbuzzjs": "^0.3.3",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"pretty-bytes": "^5.1.0",
|
|
67
67
|
"puppeteer-core": "^19.8.5",
|
|
68
68
|
"specificity": "^0.4.1",
|
|
69
|
-
"subset-font": "^2.
|
|
69
|
+
"subset-font": "^2.3.0",
|
|
70
70
|
"urltools": "^0.4.1",
|
|
71
71
|
"yargs": "^15.4.0"
|
|
72
72
|
},
|