WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.32k stars 4.12k forks source link

Consider exposing the Font Library for classic themes #64409

Open annezazu opened 1 month ago

annezazu commented 1 month ago

This has come up in a few places since the launch of the Font Library and, to ensure a dedicated focus for it, I wanted to open a standalone issue about bringing the font library to classic themes, separate from the overall Styles UI (issue here: https://github.com/WordPress/gutenberg/issues/41119). As previously noted, the font library was intentionally designed to be similar to the media library. The media library both is available as modal and a dedicated section of the admin interface, which sets a possible precedence for the font library too. In order to bring improved font management to classic themes, this issue seeks to explore what it might look like to bring the font library to classic themes.

jasmussen commented 4 weeks ago

Here's a quick design that assumes this is mainly uploading and basic adding/removing/managing:

Classic fonts, basic

There's an open question on whether the Google Fonts library can easily be made available here. I'd love some technical feedback on that, CC: @matiasbenedetto. If it's possible/feasible/reasonable to embed the entire contents of the font library modal directly, perhaps it could be integrated like this:

Classic fonts, integrated

A more likely outcome, might be to simply make the modal available from the Appearance > Fonts menu item on the top level, like this:

Classic fonts, with modal

CC: @WordPress/gutenberg-design. Figma.

matiasbenedetto commented 4 weeks ago

What do you think of the method described here to use the font library in classic and hybrid themes?: https://wpdevelopment.courses/articles/font-library-classic-or-hybrid-themes/

jasmussen commented 4 weeks ago

I think that can technically make it available, though it doesn't seem to address the spirit of this issue.

t-hamano commented 4 weeks ago

I explored the idea of ​​exposing the Global Styles, including the Font Library, for the classic theme in this comment.

jasmussen commented 1 week ago

Shared an update on https://github.com/WordPress/gutenberg/issues/41119#issuecomment-2328737652 which possibly enables a different approach to surfacing the font library for classic themes. Feel free to share your thoughts.