Toolbar side loading unneeded Google font Source Code Pro

I know this sounds pedantic but I'm currently optimising our website. This means trawling through network requests and bundles making sure to cut bloat where I find it. Is there any way we can add a param flag to the new toolbar to remove 'cosmetics' like unneeded fonts? It feels a little bit cheeky that I'm over here cutting bytes everywhere I can and Prismic be dumping fonts into my production page.

G

Hey Gareth, welcome to the Community forum!

Improving the performance, seo and score of your website is always important.
We recently released a new version of the Toolbar, as mentioned in our progress page, and one of the things that we're more excited about is the fact that the Toolbar itself is way lighter than before:

"We drastically improved the performance of the toolbar script. This script is now almost ten times smaller than in the previous version. We managed to make it 100Kb lighter (from 120kb to 14kb) than previously. This will impact all users visiting your website and on the overall performances of your website."

To know if you have this newer version which includes code splitting and smaller file size you can check by typing prismic.version in your browser console for you website like so:

Oct-21-2020 15-02-36

The version should be 4.0.0 , like above. If you don't have this then clear the cache in the browser to refresh and get then latest toolbar.

Although thus is not related to the font embedded into the toolbar, I thought you might want to hear this good news.

As for the styles of it, we don't recommend people to modify the script of the Toolbar because it may cause things to break. So we don't currently have an option to change de CSS properties of it.

Could you tell me in which way is this causing you problems in the dev process?

Thanks a lot

The issue isn't really anything more than the fact the new toolbar side loads the font Source Code Pro from Google fonts which is entirely unnecessary. Arial will do, it sounds pedantic but I don't need 645 bytes downloaded when a client is never going to see it.

On top of this it actually appears that you don't even use Source Code Pro at all so it's redundant.

You use: font-family: SF Pro,Helvetica,"sans-serif";

It seems like it, i've asked the dev team so they can communicate us if there's a reason for having the two fonts. I'll keep you posted in here about any information

In the meantime, what you could do to not have the extra font on your project would be to completely remove the Preview & Toolbar script from your project. We do not recommend this as this will prevent you from making previews in development or production (so you could to share with your client) in the future.

Thanks for the speedy reply. Yeah I think it's redundant, I'd be keen to see if the dev team can resolve this. Many thanks.

1 Like

Any update on this? Were your developers able to remove the unneeded font?

Hey Gareth, this task is still on the devs pipeline, the team will take over it as soon as possible but we don't have a rough ETA on when this is going to be. Sorry for the inconvenience. Be sure that you'll get news from us in this thread when we have news about this.

Thanks a lot

Hello, just wanted to give you a quick update about this. We've defined that this is a fix that'll be sorted out in the future but we don't have a rough ETA for it's release, therefore I'll leave this thread as an open feature request for future enhancements.

Thank you very much

Ok, great. Thanks for the update!

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the :heart: button to show your support for the feature and check out our Feature Request Guidelines.