-
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 Picker: Refine, show font preview, and load only active fonts from library #51151
Comments
Is this being handled as part of the Fonts UI work? |
Initially that was my instinct, but in order to separate concerns I split it out. Happy to consolidate again, though? |
It's ok to have it split as long as we don't lose track of it! |
Yeah, I think #52698 would be a good fit for this. I think it fits into the scope of that issue and I don't think there are any other, better tracking issues 😄 |
I just ran into this while working on a site for someone and found the lack of previews to be so frustrating. I couldn't remember exactly what each font looked like after installing a few and it resulted in a lot of unnecessary back and forth. In handing off the site to the person, it made me wish there was a preview to save them time too when they take it over. This is a long winded way of saying consider it a plus 1 to see this iterated on. |
I implemented a potential fix #67118 using styling and on the native HTML select component rendered by the FontFamilyControl. It works as expected on chromium-derived browsers (Chrome, Edge, Brave, etc). There's a known bug in Firefox that makes the browser ignore the style properties in As alternative to the native solution a custom select component that emulates the native select control could be implemented but I think that's much more complex and could impact accesibility . @WordPress/gutenberg-components input is appreciated. |
@matiasbenedetto Have you considered using CustomSelectControl? Those can be styled, and is already being used in similar things like the Appearance select in the Typography controls. |
Ohh I didn't know about that component. I will update the PR using it. Thanks for the input @mirka ! |
So excited to see this! |
Cool to see progress here! |
Extracted from #45271.
The font picker will show fonts that are registered in theme.json. As detailed in #45271, that means fonts added to your library which are active. The font picker can look like this:
The above design is an enhancement that focuses on showing a preview of the font itself, inline in the picker. But this design should not block either the webfonts API from landing, nor the font manager. The existing picker can work fine in the same system:
The text was updated successfully, but these errors were encountered: