Support » Plugin: Premium Blocks for Gutenberg » Wrong url for loading Google Fonts on Counter Block

  • Resolved Johan van der Wijk

    (@vanderwijk)


    Google has changed the urls for loading the font stylesheets and this means that the following code needs to be changed in line 7 of \premium-blocks-for-gutenberg\assets\js\countup.js:

    link.href = "https://fonts.googleapis.com/css?family=" + fontFamily.replace(/\s+/g, "+") + ":" + "regular";

    This is the updated code:

    link.href = "https://fonts.googleapis.com/css2?family=" + fontFamily.replace(/\s/g, '+').replace(/\"/g, "") + "&display=swap";

    The new filename is css2 and I have also removed the double quotes around the font name.

    I guess this code is also used on other blocks of your plugin, but I am only using the Counter Block. It would be great if this could be fixed!

    The page I need help with: [log in to see the link]

  • The topic ‘Wrong url for loading Google Fonts on Counter Block’ is closed to new replies.