-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font Weight Conflicts Between Built-in and Installed Fonts #58764
Comments
It seems to be an existing issue as we never merge the same font family between different origins (defaults, themes, and custom) 🤔 But what it should be? The UI seems to be correct as one is from the theme and the other is installed by users 😂
The reason for this issue is the editor doesn't load the font variants that are being activated. |
It makes sense to me 🙂 I'm starting to feel it's the correct behavior.
This behavior appears to be exclusive to themes that provide built-in fonts with limited font weights. Given that, I suspect there may be an issue around activating fonts: https://github.com/okmttdhr/gutenberg/blob/30b434956321d95f2d4acef83605b85f7546d61e/packages/edit-site/src/components/global-styles/font-library-modal/context.js#L311-L312 |
Going to proactively add to the 6.5 board just to be safe. We'll have the beta period to address these and dig in more but I didn't want it to get lost in the shuffle! |
Please could we define "built-in" fonts? Thank you. |
"built-in" fonts are the fonts that are provided by the theme, which is defined in The issue arises when a theme provides a limited selection of font variants (e.g., only certain weights of a font family) as "built-in". Users may attempt to enhance their font selection by installing additional font variants from Google Fonts that match the built-in font family, but they'll see this issue described above. |
I'm proposing #59066 to resolve the above issue 🙂 |
I think the issue, Heading Font Weight Not Applying in Adventurer, is related to this one as well. If a theme provides a font with ALL variants, and people install the same font with a specific variant, then only the installed variant will take effect as it overrides ALL variants provided by a theme. font-library-installed-fonts-overrides-theme-fonts.movReproduced steps:
|
Proposing #59119 to resolve the above issue |
Since this seems like it should be fixed in Wordpress core I opened a ticket in trac linking this issue: https://core.trac.wordpress.org/ticket/60605#ticket |
Note: this issue doesn't seems to be related strictly with the Font Library. The font library made it visible because of the use of |
I'm proposing a fix to this issue with an alternative approach to #59119 directly in core repo to be able to leverage the unit tests for this functionality: WordPress/wordpress-develop#6161 |
This has been addressed directly in Core. |
@youknowriad I re-opened this issue because I think it still needs to be updated in Gutenberg for retro-compatibility (users running WordPress core < 6.4 with the latest Gutenberg release). I'm moving the changes from core to compat/6.4 here: |
Got it! Going to remove this from the 6.5 board in that case. |
Closing this now because it was fixed in core by WordPress/wordpress-develop#6161 and the 6.4 proposed fix was closed following this rationale: #59376 |
Description
There was an issue (Automattic/wp-calypso#84590) related to the theme that provides built-in fonts with limited font weights. That issue seems to have been solved in Gutenberg ≥ 17.6, but new issues have arisen. These issues are observed when installing the same font as the built-in fonts provided by a theme.
Observed Issues:
Expected Behavior:
Step-by-step reproduction instructions
Adventurer
.Screenshots, screen recording, code snippet
Screen.Recording.2024-02-07.at.15.16.22.mov
Environment info
Gutenberg > 17.6
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: