Open shavidzet opened 8 years ago
You have to use the Glyph plugin to specify which glyphs to keep. If you want to keep everything, I don't think it is likely that you will get a much smaller font.
I am testing the following code and it doesnt seem to work actually:
var fontmin = new Fontmin()
.src(fontdata)
.use(Fontmin.glyph({
text: 'a',
}))
.dest('result');
fontmin.run(...);
fontdata is a font in otf format. What I get is the font in woff2 format, but it is always exactly the same size independently of what text I use in the glyph plugin. Also, why do I get woff2 files? how can I get just plain woff or ttf files?
After some more testing. Seems like using woff and woff2 as input does not really work, its as if the data just passes through, on the other hand, when using ttf as input the subsetting works.
In my case font.ttf size is 51 KB. After using fontmin it creates for me new .ttf font but the size is the same. What's going wrong?