AkashRajpurohit / howtoprofessionallysay

📖 A guide for your daily "professional" interactions

Home Page:https://howtoprofessionallysay.akashrajpurohit.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fonts optimization

pavelloz opened this issue · comments

I recommend (for performance reasons) to optimize fonts and serve modern format.

I wrote a little bit on th subject here: https://pavelloz.com/blog/google-fonts-optimization/

So when you say serve modern format, you mean to try and use woff or woff2 formats? I think currently I am loading fonts from local file, and they are of OpenType format.

Yes, font-face definition can accept multiple formats, I think serving woff2 + woff/otf/ttf means covering 99% browsers. only woff2 is not supported everywhere yet, basically.

But apart from using better format you could also optimize for characters used on website, to make the font itself much smaller.

More about support: https://caniuse.com/woff2
https://caniuse.com/woff
https://caniuse.com/ttf

Does make sense to add this for performance reasons, I can take a look at it or if you want to send a PR for this then I'm happy to take a look at it :)

Sure, ill open PR in couple of days :)