Updating fonts.hbs?
- This topic has 6 replies, 4 voices, and was last updated 8 months, 2 weeks ago by .
- AuthorPosts
- June 3, 2020 at 8:17 am#2912
deimos
I want to make sure the page only talks to my configured site. It seems my browser is connecting to fonts.gstatic.com on the simple theme. Even with the default OS fonts configured, it seems my browser is told to preconnect to fonts.gstatic.com. Is this a bug?
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="">
This is enabled here, https://github.com/GetPublii/Publii/search?q=gstatic.com&unscoped_q=gstatic.com
Thanks.
June 3, 2020 at 10:14 am#2919Bob
SupportYeap, you are right, I will fix it soon.
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!June 11, 2020 at 12:32 pm#3017NitaaiKumar
Yes please Bob, please fix this. fonts.gstatic.com is completely blocked in China so we don’t want the site to load slowly, give browser errors, or not to load correctly for Chinese visitors. And speed is the reason we choose Publii’s static html site over WordPress in the first place. Or is it fixed already?
June 11, 2020 at 12:44 pm#3019NitaaiKumar
In fact for the same above reason, I would humbly suggest that all the free official Publii themes should have self-hosted fonts instead of connecting to Google fonts as both fonts.gstatic.com and fonts.googleapis.com are totally blocked in China, which has 900+ million internet users, a fast-growing English-reading part of their population online probably in millions, and only 10-20% using a VPN for online access.
June 11, 2020 at 5:17 pm#3024deimos
I did some testing with the simple theme and left the fonts at the default of “OS Default Font + OS Default Font”. I setup a new site/page. I blocked *.gstatic.com and tried loading the site. There is zero difference in performance in my test setup. The link tag is only “preconnect”, which is blocked. As the page is not trying to load actual fonts from fonts.gstatic.com, there is no performance impact.
As expected, the browser tries to open a connection to fonts.gstatic.com just in case fonts are requested. Other than a useless connect in this case, it doesn’t have a performance impact. If gstatic.com is blocked in your environment, the firewall will see the attempt to connect to that domain.
It appears this isn’t a performance hit, just a spurious connection.
June 12, 2020 at 3:35 am#3029Bob
SupportThanks for your suggestion but I have no plan to add support for self-hosted fonts.
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!June 12, 2020 at 10:13 pm#3035boldfish
Thanks for your suggestion but I have no plan to add support for self-hosted fonts.
No plan at all? or not yet? I’d vote for an option to add self hosted fonts.
- AuthorPosts
- You must be logged in to reply to this topic.