With custom fonts, the font manager sets the CSS property "font-style" to "regular" (not a valid value for font-style)

Hi,

Like the title says.

I have tested it in a completely clean install (no plugins).

As you can see in my testing site (I enclose a secure note with credentials), we get font-style: regular ; where “regular” is not a valid value for the CSS property “font-style”.

Thanks!

Hey Diego,

I have replicated the issue in my site so I’m going to post this case in our issue tracker so this will be queued to be investigated and corrected by our development team.

Thank you for reporting and please stay tuned for updates.

Thank you Christian,

Is there any workaround to fix this in the meantime? Could you at least point me to the php file I would have to modify in my child theme?

Thanks!

Hey Diego,

This cannot be overridden using a child theme as we don’t have an API for this.

You need to edit the parent theme directly, which is not recommended. I’ll point you to the file but we cannot provide further support nor improvements for this.

Go to \themes\pro\cornerstone\includes\classes\styling and open the class-font-manager.php in a text editor.

Look for this line of code:

$buffer .= "@font-face { font-family: $family; font-display: $display; src: $sources; font-weight: $weight; font-style: $style; }";

Change the font-style value to normal or any other valid value you wish.

image

Thank you Christian!

Just one simple question, in order to avoid hardcoding normal (I would get a bad side effect with the italic versions of the font). Do you know where the $style variable is getting the values from? Those values change depending on the choice made in the dropdown menus in the font manager as shown on the following screenshot:

It should not be difficult to change the value associated with the option Regular of the dropdown from regular to normal, don’t you think so?

Thanks!

Hey Diego,

The interface code is not simple so we can’t point you to changing the options. If you’re interested in exploring this, open up app.6f62d0f.js in themes\pro\cornerstone\assets\js and app.php in \pro\framework\functions\pro\i18n

Please just note that we cannot answer any questions regarding that.

I’d recommend waiting for the fix for this in a future version.

Thanks.

1 Like