SingleFile CLI 2.16.1
CLI fixes and improvements
- single-file-core is updated to 1.6.20, see https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.19 and https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.20. For the CLI it means the following
- With
--image-reduction-factor, a resized image is now kept only when it is smaller than the original. Small images such as icons could come out larger --remove-unused-fonts(enabled by default) could remove the font face the browser draws with, so text was saved in another face or another font, e.g. tangled.org was saved in bold. The faces are now picked the way Chromium, Firefox and Safari pick them, by width, style and weight, and every face one of these browsers would draw with is kept--remove-unused-fontsremoved the fonts covering emoji and other characters above U+FFFF when they declare aunicode-range--remove-unused-fontsremoved the fonts named in afontshorthand whose weight or style is not a keyword, e.g.font: 100%/1.5 "Open Sans"on caniuse.com orfont: 450 medium Probe- On a page declaring the same fonts in the document and in shadow roots, such as nytimes.com, some text was saved in a fallback font, because of
--remove-unused-fontsand--remove-alternative-fonts(both enabled by default). Regression in 2.15.1 (core 1.6.6) for--remove-alternative-fonts - With
--compress-content, a font face declared again after an@importcould be removed in favor of the imported copy, which the browser does not draw with
Co-authored by Claude (Claude Code)