subfont

7.2.17.2.3
~

Modified (4 files)

Index: package/lib/HeadlessBrowser.js
===================================================================
--- package/lib/HeadlessBrowser.js
+++ package/lib/HeadlessBrowser.js
@@ -26,8 +26,9 @@
     revisionInfo = await browserFetcher.download(preferredRevision);
   }
   return puppeteer.launch({
     executablePath: revisionInfo.executablePath,
+    headless: 'new',
   });
 }
 
 class HeadlessBrowser {
Index: package/lib/subsetFonts.js
===================================================================
--- package/lib/subsetFonts.js
+++ package/lib/subsetFonts.js
@@ -709,9 +709,12 @@
   'optional',
 ];
 
 function getCodepoints(text) {
-  const codepoints = text.split('').map((c) => c.codePointAt(0));
+  const codepoints = [];
+  for (const c of text) {
+    codepoints.push(c.codePointAt(0));
+  }
 
   if (!codepoints.includes(32)) {
     // Make sure that space is always part of the subset fonts (and that it's announced in unicode-range).
     // Prevents Chrome from going off and downloading the fallback:
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "subfont",
-  "version": "7.2.1",
+  "version": "7.2.3",
   "description": "Speeds up your pages initial paint by automatically subsetting local or Google fonts and loading them optimally",
   "engines": {
     "node": ">=10.0.0"
   },
@@ -47,9 +47,9 @@
   "homepage": "https://github.com/Munter/subfont#readme",
   "dependencies": {
     "@gustavnikolaj/async-main-wrap": "^3.0.1",
     "@hookun/parse-animation-shorthand": "^0.1.5",
-    "assetgraph": "^7.8.1",
+    "assetgraph": "^7.13.0",
     "browserslist": "^4.13.0",
     "css-font-parser": "^2.0.0",
     "css-font-weight-names": "^0.2.1",
     "css-list-helpers": "^2.0.0",
@@ -89,13 +89,16 @@
     "nyc": "^15.1.0",
     "offline-github-changelog": "^1.6.1",
     "prettier": "~2.3.0",
     "proxyquire": "^2.1.1",
-    "puppeteer": "^19.8.5",
+    "puppeteer": "^24.40.0",
     "sinon": "^9.0.2",
     "unexpected": "^11.8.1",
     "unexpected-check": "^2.3.1",
     "unexpected-resemble": "^5.0.1",
     "unexpected-set": "^2.0.1",
     "unexpected-sinon": "^10.11.2"
+  },
+  "overrides": {
+    "canvas": "latest"
   }
 }
Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,4 +1,13 @@
+### v7.2.3 (2026-03-21)
+
+- [Bump assetgraph to ^7.13.0](https://github.com/Munter/subfont/commit/2963cc38663d00bc115dffcac4942a0e0f94db58) ([Andreas Lind](mailto:[email protected]))
+
+### v7.2.2 (2026-03-21)
+
+- [Drive-by: Add test for unicodeRange generation](https://github.com/Munter/subfont/commit/ae58ca03f846d5e95942875bf163f66d4c6cdb1c) ([Andreas Lind](mailto:[email protected]))
+- [Fix extraction of codepoints from the page text in the presence of surrogate pairs](https://github.com/Munter/subfont/commit/5f29df4cdf59b1f903bee040ba896877776ec0c8) ([Andreas Lind](mailto:[email protected]))
+
 ### v7.2.1 (2024-05-08)
 
 - [Update font-tracer to ^3.7.0, fixes \#173](https://github.com/Munter/subfont/commit/0fae200fe8156ab5ccbf632c765e75d65a240210) ([Andreas Lind](mailto:[email protected]))
 - [Update subset-font to ^2.3.0](https://github.com/Munter/subfont/commit/b5cd91e1a6d1baa92900f586c184b9501de4fe08) ([Andreas Lind](mailto:[email protected]))
@@ -100,15 +109,11 @@
 
 - [Update subset-font to ^1.5.0](https://github.com/Munter/subfont/commit/ba79ef6db81cedfd0e52672b530ca3afddd68a94) ([Andreas Lind](mailto:[email protected]))
 - [Fix warning about missing glyphs for BMP chars](https://github.com/Munter/subfont/commit/5ba0168f35bfef33f9bb9cc8a6d64de8fa1d5585) ([Andreas Lind](mailto:[email protected]))
 - [Fix CHANGELOG generation in preversion script](https://github.com/Munter/subfont/commit/3ea696f8c336c6072411c9817c0c2f5b8d8d61b9) ([Andreas Lind](mailto:[email protected]))
-
-### v6.6.1 (2022-07-09)
-
-- [ugrvw](https://github.com/Munter/subfont/commit/5ccb873025f9790faf65641551df1a7e65fbfdbf) ([Andreas Lind](mailto:[email protected]))
 - [Fix CHANGELOG https:\/\/github.com\/Munter\/subfont\/commit\/5365689a5a925304a158fddef2b6af702857371c\#r78084394](https://github.com/Munter/subfont/commit/d42c7a2cffd33662d42d4532c45cb8b90080f128) ([Andreas Lind](mailto:[email protected]))
 - [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:[email protected]))
-- [Tests: Tolerate u+ in unicode-range \(I guess an in-range dep changed\)](https://github.com/Munter/subfont/commit/92a7871457246b64a997c0bffd9bb2766655d811) ([Andreas Lind](mailto:[email protected]))
+- [+1 more](https://github.com/Munter/subfont/compare/v6.6.0...v6.7.0)
 
 ### v6.6.0 (2022-07-09)
 
 #### Pull requests
@@ -393,15 +398,18 @@
 
 #### Pull requests
 
 - [#76](https://github.com/Munter/subfont/pull/76) Fix the prettier setup ([Andreas Lind](mailto:[email protected]))
-- [#75](https://github.com/Munter/subfont/pull/75) Fix omitFallbacks with Google Web Fonts ([Andreas Lind](mailto:[email protected]))
 
 #### Commits to master
 
 - [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:[email protected]))
 - [Don't populate source map relations](https://github.com/Munter/subfont/commit/5c07218b6f1dcc6fad88702a3bcb7b33bf9df54e) ([Andreas Lind](mailto:[email protected]))
 
+### v4.1.2 (2020-01-09)
+
+- [#75](https://github.com/Munter/subfont/pull/75) Fix omitFallbacks with Google Web Fonts ([Andreas Lind](mailto:[email protected]))
+
 ### v4.1.1 (2020-01-04)
 
 - [Add regression test](https://github.com/Munter/subfont/commit/46eddce9c09268dbde459b1f98fe5cec9e4c98f5) ([Andreas Lind](mailto:[email protected]))
 - [Don't attempt to prefetch inlined fonts](https://github.com/Munter/subfont/commit/844e21e53b72ac7c7efe2f4c0549a71ade5d823c) ([Jesse Farebrother](mailto:[email protected]))
@@ -430,9 +438,10 @@
 - [Reference image tests: Close pages after screenshotting them](https://github.com/Munter/subfont/commit/7ae9494535c9fbcde4328aa43d98de43eddc0d01) ([Andreas Lind](mailto:[email protected]))
 - [Add vscode debugger launch configuration for the test suite](https://github.com/Munter/subfont/commit/f8f9abc42909c556765555cc49f44eb40a9194db) ([Andreas Lind](mailto:[email protected]))
 - [Guard against an already detached relation when cleaning up](https://github.com/Munter/subfont/commit/6392fc359222772c9033a58a9020e3b35487d019) ([Andreas Lind](mailto:[email protected]))
 
-### v4.0.3
+### v4.0.3 (2019-11-02)
+
 #### Pull requests
 
 - [#67](https://github.com/Munter/subfont/pull/67) Only warn about missing fonttools install if we are actually trying t… ([Peter Müller](mailto:[email protected]))