Skip to content

Instantly share code, notes, and snippets.

@SvenPam
Last active November 19, 2018 09:21
Show Gist options
  • Save SvenPam/32c3d43012bae2e26014ae5e6d5d9ed6 to your computer and use it in GitHub Desktop.
Save SvenPam/32c3d43012bae2e26014ae5e6d5d9ed6 to your computer and use it in GitHub Desktop.
Font Minifification - Webpack
let fontmin = new Fontmin()
.use(
Fontmin.glyph({
text: `1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_'abcdefghijklmnopqrstuvwxyz?&{|}\/~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž,“”‘’`
})
)
.use(ttf2woff2())
.use(Fontmin.ttf2woff())
.src(`${plConfig.paths.source.fonts}/**/*.ttf`)
.dest(plConfig.paths.public.fonts);
fontmin.run(function(err, files) {
if (err) {
throw err;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment