Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Option to just optimize fonts, nothing else. #156

Open
the-hotmann opened this issue Jan 6, 2022 · 0 comments
Open

[Feature Request] Option to just optimize fonts, nothing else. #156

the-hotmann opened this issue Jan 6, 2022 · 0 comments

Comments

@the-hotmann
Copy link

the-hotmann commented Jan 6, 2022

My website is finished and should stay as it is. Just the font should be optimized.

ATM my command is:

yarn subfont -rs --formats='woff2,woff' public/index.html -o test/

(--formats='woff2,woff' to prevent #155 since if multiple formats are given they are not getting inlined into the CSS as base64 encodes.)

it creates a copy of my whole "public" folder and optimizes the fonts for ALL the included static pages. But at the end I just need the fonts, nothing more! I then write the woff2 back to the public folder.

All this overhead would not be needed. Therefore I would really like to have a "--just-fonts" option.

Overall (with #155) my command should look like this:

yarn subfont --no-base64 --just-fonts -rsi --formats='woff2' public/index.html

(--formats='woff2' maybe not even needed as -i is active which stands for "inplace" and therefore should be the same format as started with since it gets overwritten.)

which then would crawl the whole page optimize the font for ALL pages and then write back just the two fonts and overwrite the old ones. That would be way easier then creating a "test" folder, which I (after writing all the overhead to) delete again.

That would be really cool. Thanks in advance and if I can assist in some way please let me know.

The idea behind this is, to be able to configurate the command in a way, that you in the end know, if you run that over a statically generated website the only things that will change are the font files itself. That would be a dream.

Not needing to write all the other stuff should speed up the process and create less overhead. Also it should be able to run "in-place" without affecting a lot of things like HTML, CSS, JS. But instead just the font files itself. I think that would be a very clean approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant