Local Font added to styles with quotes in different place

Description:

When migrating a site from 1.4.1.8 to 1.4.3, we encountered an issue with local fonts.

We had a Local Font “Open Sans” with a fallback set of Arial and sans-serif.

After the migration the front end styles showed it as:
font-family: "Open Sans, Arial, sans-serif";
instead of:
font-family: "Open Sans", Arial, sans-serif;

The position of the quotes is wrapped around the entire set of fonts rather than just the local font name that has multiple words.

We also attempted to delete the font and re-add it. When doing this the same issue recurred.

Screenshots, screen recording, code snippet

Adding Local Font:
Screenshot 2024-09-23 at 22.35.04

Added via Stylesheet:
Screenshot 2024-09-23 at 22.35.25

Environment info

  • WordPress version: 6.6.2
  • Cwicly Plugin version: 1.4.3

Had this happen to me today as well. Only way to fix it was to delete the style and create it again from scratch.

1 Like

Hello @StrangeTech and @sunny,

Is this only happening on migration or whenever you add a fallback set?

Thanks in advance.

Hello @Louis,

Adding a fallback set to the style that has the issue actually adds those fallback fonts in addition to the quoted ones:

font-family: "Open Sans, Arial, sans-serif", Arial, sans-serif;

Adding fallback fonts with a freshly created style doesn’t have this issue.

Happens immediately upon updating from 1.4.1.8 to 1.4.3.

If I recall, it wouldn’t show any fallback fonts selected in the UI, even though something like
"Open Sans, "Arial, sans-serif; would be outputted in the CSS.

There was no way to fix it without deleting the style and creating a new one. It would even reference the broken styling when I tried to copy/paste the style.

2 Likes

Every point @sunny mentions was our experience also.

Hello @StrangeTech and @sunny,

Thanks for the details, much appreciated.
We should have a fix for this in the next update.

2 Likes

Hello @Louis,

Final bit of additional context for you.

Migrating a site with global styles with a font face with multiple words in the name but not having any fallback fonts works perfectly and doesn’t have the issue.

Adding fallbacks after migration also works flawlessly for those migrated styles.