subfont 7.1.0 → 7.1.1
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 +4 -0
- package/lib/subsetFonts.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
### v7.1.1 (2023-05-07)
|
|
2
|
+
|
|
3
|
+
- [Fix file name generation when the font-family contains backslash Fixes \#171](https://github.com/Munter/subfont/commit/1cff3c4095680569ecf50d017035730eb4bd0cc0) ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
|
4
|
+
|
|
1
5
|
### v7.1.0 (2023-04-15)
|
|
2
6
|
|
|
3
7
|
- [#170](https://github.com/Munter/subfont/pull/170) Use harfbuzzjs instead of fontkit ([Andreas Lind](mailto:andreaslindpetersen@gmail.com))
|
package/lib/subsetFonts.js
CHANGED
|
@@ -1475,9 +1475,11 @@ async function subsetFonts(
|
|
|
1475
1475
|
.split(/\s+/)
|
|
1476
1476
|
.map((token) => normalizeFontPropertyValue('font-weight', token))
|
|
1477
1477
|
.join('_');
|
|
1478
|
-
const fileNamePrefix = `${unquote(
|
|
1478
|
+
const fileNamePrefix = `${unquote(
|
|
1479
|
+
cssFontParser.parseFontFamily(nameProps[0])[0]
|
|
1480
|
+
)
|
|
1479
1481
|
.replace(/__subset$/, '')
|
|
1480
|
-
.replace(/
|
|
1482
|
+
.replace(/[^a-z0-9_-]/gi, '_')}-${fontWeightRangeStr}${
|
|
1481
1483
|
nameProps[2] === 'italic' ? 'i' : ''
|
|
1482
1484
|
}`;
|
|
1483
1485
|
|