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

Font Library: remove font family and font face preview keys from theme.json schema #58392

Closed
matiasbenedetto opened this issue Jan 29, 2024 · 1 comment · Fixed by #58395
Closed

Comments

@matiasbenedetto
Copy link
Contributor

matiasbenedetto commented Jan 29, 2024

What?

Remove font family and font face preview keys from theme.json schema.

Why?

During the implementation work of the Font Library, in #56793, we added a preview key to theme.json to persist a preview image of the font family. The preview image had the objective of speeding up the font family preview display by reducing network usage by loading just a tiny image instead of a complete font asset.

Later in the implementation process, we figured out that this won't be strictly necessary for the fonts present in theme.json/global styles due to they probably will be already loaded in the browser to use in the editor. Because of this, I think It would be fine to revert this change that doesn't seem crucial for the performance of the Font Library and could add an unnecessary change for theme.json.

@creativecoder
Copy link
Contributor

Keeping the font preview file out of theme.json (and instead having it as part of Font Library metadata) makes sense to me.

I think the font definitions in theme.json should generally be about rendering the fonts for use as typography settings, and not storing additional metadata we want have for the Font Library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants