WIP: Bricks 2.0: font manager do not download font with diacritics

Hi guys,

I’m using bricks 2.0 and there seems to be issue with downloaded fonts.

Let me explain:

  1. If I use normal external font (Manrope or Bona nova SC - the both support czech language with diacritics), the’re working on the fronted as they should, no problem. In builder and on frontend there is no problem.

  2. If I use font manager, downloaded these fonts and assign them in theme styles to body and headings, in builder it looks ok, but on frontend there is broken diacritics. (no matter if in Performance - google fonts are allowed or not). Strange is this is only on frontend, in builder it seems to be ok.

  3. If I manually update the font files with the ones from google fonts, it’s working.
    But I’m using the .ttf format (available from google fonts), not .woff2 (which Bricks download), maybe that’t the problem?

Could you check it’s working properly?
Thanks
Jitka

3 Likes

Hi Jitka,
Thanks so much for your report!

We have already received a report via email that similar problems occur with Chinese characters and have already created a task for this. We will update this report as soon as the problem is solved.

You can download woff2 versions of the fonts here—these should work for now:

Best regards,
timmse

2 Likes

Hey Timmse!

Any update on this?

Thanks in advance.

Hi @adako,

no updates yes. As you can see, the issue is still in WIP (= Work In Progress). You still have to use the workaround mentioned above.

Thank you for understanding,
Matej

I think I ran into same problem. The thing is - your custom Fonts feature doesn’t support unicode-range, so it breaks fonts while trying to download them from Google Fonts API v2. You need to update the font manager to handle multiple subsets and preserve unicode-range. For now I’m using monkey patch in my child theme that overrides @font-face rules from Bricks custom fonts. Example:

wp_enqueue_style(
	'font-inter',
	get_stylesheet_directory_uri().'/google-fonts/css/inter.css',
	['bricks-frontend'],
	'1'
);

Somewhat laborious process, but what I do to get the smallest font files possible for a site in Czech or any other language for that matter is download normal TTF from Google fonts (Using the full version of the font with all glyphs) or anywhere else and go to:

  • Put on expert mode
  • You can choose which glyphs to include by language. You can go from 1000+ glyphs to 100 because you only load for example Czech. Getting a tiny file in the process.
  • Upload that font and

I am also expeiencing this bug.