• Resolved ckubs

    (@ckubs)


    I am pretty new to Gutenberg but your theme is one of the best to work with and learn how things work.

    Had a non Gutenberg website with only one custom font, Jost, used in various weights. Picked Jost from the fonts list on my Gutenberg-Uniblock test site but selecting various weights they display either as 400/regular or 700/bold. From where do custom fonts are loaded and how to add/enable all weights? Thank you in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @ckubs

    I’m glad you find our theme useful!

    The following function from the theme registers the fonts:
    https://github.com/wpzoom/uniblock/blob/main/functions.php#L207

    You can see in the list which weights are available for each font.

    For example, for the Jost font, we’ve added the following weights: 400, 500, 600, 700. We skipped a few ones, but we can add the missing weights in the next theme update.
    https://fonts.google.com/specimen/Jost?query=jost

    If you’re comfortable making changes in the theme files feel free to replace the line with the Jost font in the functions.php file with this one:

    'Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900',

    Thread Starter ckubs

    (@ckubs)

    @ciorici Thank you for the response. In the meantime tried to add Jostas you added Outfit in theme json. Don’t know if I must add anything else or the font is faulty( downloaded from Google and converted TTF to WOFF online) but, no matter what, it doesn’t want to go below regular weight. Outfit would have been interesting Futura inspired too and only a tad wider but it doesn’t have diacritics.

    • This reply was modified 2 years, 1 month ago by ckubs.
    Thread Starter ckubs

    (@ckubs)

    @ciorici I found out where all those fonts came fron :)) Them I followed your advice and everything works seamlessly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing font weights’ is closed to new replies.