Sign in

Updating fonts.hbs?

  • This topic has 6 replies, 4 voices, and was last updated 1 year, 1 month ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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.

     

    #2919
    Bob

    Yeap, 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!

    #3017
    NitaaiKumar

    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?

    #3019
    NitaaiKumar

    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.

    #3024
    deimos

    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.

    #3029
    Bob

    Thanks 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!

    #3035
    boldfish

    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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.