Munter / subfont

Command line tool to optimize your webfont loading. Aggressive subsetting based on your font use, self-hosting of Google fonts and preloading
MIT License
1.56k stars 29 forks source link

Removing original font files with --in-place and --no-fallbacks #134

Open thewilkybarkid opened 3 years ago

thewilkybarkid commented 3 years ago

I'm trying out running subfont after a parcel build (refs https://github.com/Munter/subfont/issues/78):

subfont --harfbuzz --in-place --no-fallbacks 

It works great, but the original font files are left behind in my build directly, but are unlinked. Is it possible to have them deleted?

papandreou commented 3 years ago

Not presently, but it seems like a nice feature to have for tidiness. I guess it's generally not that big a problem to leave them around in the build unlinked, though? An extra megabyte's worth of charges in your S3 bucket?

papandreou commented 3 years ago

How has --harfbuzz been working for you, btw.? Have you noticed any glitches with the subset font files?

thewilkybarkid commented 3 years ago

Not presently, but it seems like a nice feature to have for tidiness. I guess it's generally not that big a problem to leave them around in the build unlinked, though? An extra megabyte's worth of charges in your S3 bucket?

Indeed, not much of a problem, they're just redundant. I'm deleting them manually for the moment, but it'd be happy to have a less risky option.

How has --harfbuzz been working for you, btw.? Have you noticed any glitches with the subset font files?

I really like the idea of not having to go through Python; it seems to work pretty well, but I've turned it off for the moment as it doesn't include contextual alternates.

papandreou commented 3 years ago

A very similar feature request came up here: https://github.com/Munter/hyperlink/issues/191

Maybe we could serve both use cases with a standalone tool. Looks like the main blocker is still that we don't have a good name for it -- and that it hasn't been created yet :sweat_smile:

papandreou commented 3 years ago

How has --harfbuzz been working for you, btw.? Have you noticed any glitches with the subset font files?

I really like the idea of not having to go through Python; it seems to work pretty well, but I've turned it off for the moment as it doesn't include contextual alternates.

Okay, thanks. It'll get there!