• More than four years ago I discovered that Hueman loads too many fonts. In Safari, Hueman even loads some fonts twice! I reported the issue, and @nikeo followed up by writing “thanks for reporting this issue. I’m exploring it.” The topic was closed.

    Later I explained the problem in detail in this thread.
    @nikeo wrote: “I’m currently focused on fixing minor issues with the upcoming version of WP (5.8). The font preload optimization is next in my list.” Also this topic was closed.

    On GitHub, the issue is marked as Bug and Urgentsee here.

    I know the Hueman theme receives little support, but I wanted to bring attention to this issue in case @nikeo or @amirzia have time to have a look. Here are my main finds:

    1) Hueman preloads 8 (!) different woff/woff2 font files, even if several of them are not used for rendering the page. E.g., here are the Warnings I see in Firefox (the issue is more severe in Safari):

    The resource at “…/themes/hueman/assets/front/webfonts/fa-regular-400.woff2?v=5.15.2” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

    The resource at “…/themes/hueman/assets/front/fonts/titillium-lightitalic-webfont.woff” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

    The resource at “…/themes/hueman/assets/front/fonts/titillium-regularitalic-webfont.woff” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly.

    2) In addition, if Safari is used, the svg versions of Titillium is also loaded, which adds another 3 or 4 font files, giving a total of 11–12 (!) font files in order to load a website using Hueman. This seems like a bug.

    Comments (not related to the potential bug when using Safari):

    Hueman uses too many fonts. The theme author might have inherited this issue from @alxmedia, who is the original author of this fantastic theme. I hope Hueman in the future will rely on a smaller set of fonts. The typography and layout of Hueman does not need 8 different woff/woff2 font files in order to look good.

    Also, Hueman (probably) preloads too many font files. The theme preloads all fonts, regardless of whether the page uses them or not. I’m not an expert, so I don’t know if this is easy to fix.

    Useful info on fonts and font preload: https://sia.codes/posts/making-google-fonts-faster/

    • This topic was modified 1 year, 1 month ago by yallaman.
Viewing 3 replies - 1 through 3 (of 3 total)
  • As you tagged me, I decided to download and take a quick look at the code as I had some time to spare.

    First impression: wow… Hueman sure has a lot of files and the code has changed a lot since I created it, was it in 2013? I just want to point you in the right direction.

    1. Is there no way to select another font in the theme admin, which disables the self-hosted font from loading?
    2. If not, go to /hueman/functions/init-front.php and on line 1401-1460 you will see the section which includes the fonts. You could try just removing this code section entirely. Note: If you break something I’m not responsible 😀

    Hope it helps.

    Thread Starter yallaman

    (@yallaman)

    Great to see the original creator of Hueman! Thanks for your reply and suggestion. I tagged you as a tribute, not in order to receive support 🙂 Hopefully the current developer can chime in. But as this is not a critical issue, I don’t really expect a fix.

    I don’t dare to remove the code from init-front.php from my live site. Besides, I definitely want font preload, it’s a great feature. I just think that Hueman should not preload that many font files.

    Based on tests made on my own website as well as Hueman’s official demo site, it seems that:

    1. Hueman preloads font files that are not used.
    2. In the Safari browser, Hueman loads both woff and svg versions of Titillium, see below.

    Here is the list of font files – 13 in total – that Hueman loads on one of the pages on my site using the default self-hosted Titillium font. Note that Hueman loads both woff and svg versions when using Safari:

    fa-brands-400.woff2
    fa-regular-400.woff2
    fa-solid-900.woff2

    titillium-light-webfont.woff
    titillium-light-webfont.svg

    titillium-lightitalic-webfont.woff
    titillium-lightitalic-webfont.svg

    titillium-regular-webfont.woff
    titillium-regular-webfont.svg

    titillium-regularitalic-webfont.woff
    titillium-regularitalic-webfont.svg

    titillium-semibold-webfont.woff
    titillium-semibold-webfont.svg

    In Firefox, Hueman loads 8 font files, i.e. it skips the 5 svg versions of Titillium.

    Thread Starter yallaman

    (@yallaman)

    Too bad there is no support for this theme, except fixing potential critical issues once a year or once every two years. I am, of course, very grateful that the current developer is taking care of critical problems, though. I have used Hueman since 2014, and I hope to continue using it.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bug report: Excessive font loading (AGAIN)’ is closed to new replies.