When custom fonts are used, the CSS font-style is set to an invalid parameter: regular

When a custom font is uploaded within the Fonts section of the pro theme, the font-style CSS parameter is generated with the invalid value “regular”:

The inline CSS:

W3 validator:

The custom font selection:

Hello @TheOwnplay,

Thanks for writing in! The resulting CSS output should only display normal or italic.
Screenshot 2023-05-27 at 10.39.14 AM

Please make sure that you are using the latest version of the X theme or the Pro theme. If you wouldn’t mind, please provide us the URL of your site so we can check it as well.

Best Regards.

Hey @ruenel ,

your code features the standard inline CSS, but not the one related to the custom font definitions. Have you tried it by adding a custom font to the pagebuilder?
Please refer to my initial screenshot to get more details on how you can replicate it.

Hello @TheOwnplay,

I am using the custom font that I have added.

Screenshot 2023-05-28 at 8.37.38 AM

Can you provide us your site URL or the WP Access so we can check the site? You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Hey @ruenel - Thanks for your answer, but my system is a local testing system.
I’ve dug a bit deeper into it and here are my findings + additional details:
The font-style:regular is caused by this setting:

In your previous screenshot of the minified HTML, I can see that your reference is part of some bigger kind of CSS code (I guess from a minified file or online).
The problem with the font-style appears in the font definition of the plugin. which is added as inline to the HTML content. Here’s the full content that Cornerstone adds to the page (It’s the last styling before the tag):

<style>@font-face{font-family:"demo-font-family";font-display:auto;src:url('https://mydomain.test/wp-content/uploads/2023/06/montserrat-v25-latin-regular.woff') format('woff');font-weight:400;font-style:regular;}</style>

As you can see it shows font-style: regular. - When I switch the setting from my first screenshot to italic, It changes the “regular” to italic as well.

Not sure if that’s relevant, but font manager is enabled:
image

Hey @TheOwnplay,

I see that it still show regular in the latest version. I’ll report this to our development team so it will output the correct font-style.

Thanks for reporting.

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