Skip to content
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

[Fonts API] Removes adding missing fonts into theme.json #51717

Conversation

hellofromtonya
Copy link
Contributor

@hellofromtonya hellofromtonya commented Jun 20, 2023

Fixes #51716

What?

Removes adding the missing fonts into the theme.json by removing WP_Fonts_Resolver:: add_missing_fonts_to_theme_json() and its associated code.

Why?

Previously the Fonts API added the fonts from plugins into theme.json. With the new Font Library and font management, plugins will no longer register with the Fonts API, but instead will interact with the Font Library (when that capability is available).

How?

  • Remove invoking it from within WP_Theme_JSON_Gutenberg::get_theme_data().
  • Remove WP_Fonts_Resolver:: add_missing_fonts_to_theme_json() and any of its associated private methods.
  • Remove its tests.

Testing Instructions

Screenshots or screencast

@github-actions
Copy link

Flaky tests detected in d1e5584.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5327457174
📝 Reported issues:

@annezazu annezazu added [Feature] Typography Font and typography-related issues and PRs and removed [Feature] Fonts API labels Sep 25, 2023
@github-actions
Copy link

Warning: Type of PR label error

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Accessibility (a11y), [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: [Feature] Typography.

Read more about Type labels in Gutenberg.

@hellofromtonya
Copy link
Contributor Author

The Fonts API is deprecated, replaced by Font Face to work with the Font Library. Thus this PR can be closed without merging.

@hellofromtonya hellofromtonya deleted the try/fonts-api-remove-add-missing-fonts-to-themejson branch September 25, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Typography Font and typography-related issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fonts API] Remove adding missing fonts into theme.json
2 participants