rsify / pico

Take browser screenshots in Javascript 📸
MIT License
1.96k stars 45 forks source link

Only download used font files #8

Open rsify opened 4 years ago

rsify commented 4 years ago

Taking a screenshot on usegripeless.com needs around 7MB of resources to be downloaded on the first run (latter runs use browser cache) - most of which being imported fonts which the library currently blindly inlines even though 95% of the imported files aren't actually being used.

A potential solution is to use Document.fonts in newer browsers, haven't researched it extra deeply though.