subfont
7.2.17.2.3
lib/subsetFonts.js~
lib/subsetFonts.jsModified+4−1
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: