Helix Ultimate 2.2.11 — using a locally hosted font in template Typography (no requests to Google) - Forum | JoomShaper
Staff replied Helix Framework Joomla 6 v2.2.11

Helix Ultimate 2.2.11 — using a locally hosted font in template Typography (no requests to Google)

Asked by Fabio Capponi 6 days ago Last activity 3 days ago

Hello,

We maintain the website of an Italian trade union (CGIL Prato-Pistoia). For data
protection reasons the site must not make any request to fonts.googleapis.com or
fonts.gstatic.com: the fonts have to be served from our own server.

We have already hosted the fonts locally, using your own tools:

  • Bebas Neue — installed through the SP Page Builder font manager as a local
    font: media/com_sppagebuilder/assets/custom-fonts/Bebas Neue/ with its
    stylesheet.css, and a row of type local in #__sppagebuilder_fonts.
  • Encode Sans — downloaded locally by the same font manager:
    media/com_sppagebuilder/assets/google-fonts/Encode Sans/, row of type google.
  • The template's own font folder, templates/shaper_helixultimate/fonts/, also
    contains the woff2 files, declared with @font-face in css/custom.css.

Despite this, the template Typography settings (Body font, H1–H6, Navigation) still
add a <link> to fonts.googleapis.com on every page of the site.

Looking at plugins/system/helixultimate/src/Core/HelixUltimate.php (version 2.2.11),
around lines 1290–1318:

$systemFonts = array(
    'Arial', 'Tahoma', 'Verdana', 'Helvetica',
    'Times New Roman', 'Trebuchet MS', 'Georgia'
);

if (is_array($fonts))
{
    foreach ($fonts as $key => $font)
    {
        $font = json_decode($font ?? "");

        if (!in_array($font->fontFamily, $systemFonts))
        {
            $fontUrl = '//fonts.googleapis.com/css?family=' . $font->fontFamily . ':100,…';
            $this->doc->addStylesheet($fontUrl, ['version' => 'auto'], …);
        }
        …
    }
}

So any family that is not one of those seven names is requested from Google, whether or
not a local copy exists. We could not find any parameter, prefix or setting that tells
Helix Ultimate "this font is already hosted here".

Our questions:

  1. Is there a supported way, in Helix Ultimate 2.2.11, to pick a locally hosted font
    in the template Typography fields, so that no request is made to Google? A local or
    custom source in the font picker, a particular value in the parameter, or a setting
    we have overlooked?

  2. If there is not: can Helix Ultimate read the fonts installed through the SP Page
    Builder font manager (#__sppagebuilder_fonts)? Both are JoomShaper products, the
    font files are already on the server in a known folder, but the two parts do not seem
    to know about each other.

  3. If neither is possible today, is such an option planned? The requirement is common
    for European websites since the German rulings on Google Fonts, and it currently
    forces us to bypass your Typography panel altogether.

What we are doing in the meantime, in case it is useful to other users: we switch
off enable_body_font, enable_h1_font … enable_navigation_font in each template
style and reproduce the exact CSS that Helix would generate inside
templates/shaper_helixultimate/css/custom.css, next to the @font-face declarations.
The result on screen is identical and no request reaches Google — but the Typography
panel becomes inert, which is confusing for the other editors of the site, and the
settings have to be kept in two places.

Environment

| Joomla | 6.2.0 |
| PHP | 8.3.36 |
| Helix Ultimate | 2.2.11 (plugin and template) |
| SP Page Builder | 6.10.0 |
| Template styles | 6, one per language (it, en, zh, fr, es, ar), identical typography |

Thank you for your help.

3 replies

Martin Grunert

Hi Fabio,

you are correct: Helix Ultimate currently does not recognize locally installed fonts from the SP Page Builder Font Manager. Although both are JoomShaper products, their font management is separate.

This exact limitation was actually one of the reasons why I developed OD Local Fonts.

The idea is to provide one central local font library and make those fonts available directly inside the native typography controls of Helix Ultimate and SP Page Builder, without requiring Google Fonts requests or manually maintaining the same fonts in multiple places.

So you can continue using the normal Helix Ultimate Typography settings for Body, H1–H6, Navigation, etc., while the selected fonts are served locally.

Your current custom.css solution works, of course, but as you already mentioned, the downside is that you effectively lose the native Helix typography workflow.

That was exactly the gap I wanted to solve.

You can find OD Local Fonts in the Joomla Extensions Directory:
https://extensions.joomla.org/extension/od-local-fonts/

Paul Frankowski Senior Staff

Caio,

  1. Not yet, planned.
  2. Indeed, use Martin's extension; it solved all problems right away.
Paul Frankowski Senior Staff

In SPPB 7.x, Google Fonts will be loaded locally, without asking the Google server.

Log in to reply.