BUG: Font Weights Reset After Update

When we updated our Pro theme from 6.1.5 to 6.2.4, anywhere we use font weights other than 400 (Normal) or 700 (Bold) are no longer rendering properly. I will provide 2 links in a Secure Note to demonstrate this, but below is where the issue lies.

Before updating the Pro theme:
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i&amp;subset=latin,latin-ext&amp;display=auto" type="text/css" media="all" crossorigin="anonymous" data-x-google-fonts="">

After updating the Pro theme:
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,400i,700,700i&#038;subset=latin,latin-ext&#038;display=auto" type="text/css" media="all" crossorigin="anonymous" data-x-google-fonts></link>

I have created a band-aid fix for this by placing the following code in my functions.php file:

function add_extra_google_fonts() {
    echo '<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,500,500i,900,900i&amp;subset=latin,latin-ext&amp;display=auto" type="text/css" media="all" crossorigin="anonymous">';
}
add_action('wp_head', 'add_extra_google_fonts');

Since I am assuming this is a bug, I am reporting it here. Please let me know when this will be fixed so I can remove our band-aid fix.

Thanks!

I think you need to change the font family from inherit to the font family you intend to load in. It was really a bug that google fonts was loading in every single weight. It loads weights on the fly if knows what family to look at or by what weights are defined in the font palette. I will add a filter or option that will change the loading to make sure every weight is loaded. Thanks for bringing this to our attention. It would be nice if inherit knew what family to check, but it currently works by CSS selectors. Have a great day!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.