-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Avoid loading theme fonts twice and assume they were already resolved by the font face resolver. #59421
Conversation
… by the font face resolver. This allows us to remove some related to guess the url of theme fonts.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -38 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me and tests well.
Testing notes:
- Installed
adventurer
theme - Uploaded Open Sans
- Replaced all the fonts faces to use open sans in headings, text, etc, etc
- Saved, reloaded site editor
- Confirmed that the theme font's
@font-face
definitions appeared in the site editor markup. - Confirmed the fonts loaded once I opened the font library
- Reset to default styles
- Confirmed that open-sans loaded once I opened the font library.
packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
This is working for me as well. I tested that installing fonts still work as expected without having to reload pages to get the styles or anything. |
… by the font face resolver. (#59421) * Avoid loading theme fonts again and assume they were already resolved by the font face resolver. This allows us to remove some related to guess the url of theme fonts. * fix comment text Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> --------- Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org> Co-authored-by: peterwilsoncc <peterwilsoncc@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
I just cherry-picked this PR to the update/packages-6.5-rc1 branch to get it included in the next release: 30c4f7d |
… by the font face resolver. (#59421) * Avoid loading theme fonts again and assume they were already resolved by the font face resolver. This allows us to remove some related to guess the url of theme fonts. * fix comment text Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> --------- Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org> Co-authored-by: peterwilsoncc <peterwilsoncc@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
What?
Why?
How?
If we deal with theme fonts:
Testing Instructions
Screenshots or screencast
The theme fonts should render as expected here: