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

[Tracking] Font Library. Stage 2: Fonts Library extensions #53307

Closed
15 of 18 tasks
matiasbenedetto opened this issue Aug 3, 2023 · 21 comments
Closed
15 of 18 tasks

[Tracking] Font Library. Stage 2: Fonts Library extensions #53307

matiasbenedetto opened this issue Aug 3, 2023 · 21 comments
Labels
[Feature] Typography Font and typography-related issues and PRs [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@matiasbenedetto
Copy link
Contributor

matiasbenedetto commented Aug 3, 2023

Tracking issue for the Font Library.
Stage 2: Google fonts collection and Font Library extensions

What ?

Add the ability to install Google fonts.
Make the font library extensible providing an API to add font collections to be installed by the users.

To do:

Needs discussion

In Progress:

Dismissed

Links

Stage 1: #52698
Stage 3: #53926

@matiasbenedetto matiasbenedetto changed the title [Tracking] Fonts Library. Stage 1: Fonts Library extensions [Tracking] Fonts Library. Stage 2: Fonts Library extensions Aug 3, 2023
@mikachan mikachan added [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. [Feature] Typography Font and typography-related issues and PRs labels Aug 3, 2023
@hellofromtonya
Copy link
Contributor

With the Fonts Library having Google Fonts and the ability for users to upload font files, I suspect the vast majority of font needs are covered. Thus, IMO this stage should wait until there's a real need or ask from extenders to provide a way for other fonts to be presented for user consideration.

@hellofromtonya hellofromtonya changed the title [Tracking] Fonts Library. Stage 2: Fonts Library extensions [Tracking] Font Library. Stage 2: Fonts Library extensions Aug 17, 2023
@priethor
Copy link
Contributor

@juanmaguitar, these extensibility points would benefit from outreach & feedback with extenders. Can you put it on your radar for the next months?

@matiasbenedetto
Copy link
Contributor Author

Added a PR that implements simple extensibility options to add new font collections from plugins for example.
#53816

I think this won't be just useful for plugins but also is a good way to standardize the way we register the font collections that are intended to be in core for example the Google one.

@matiasbenedetto
Copy link
Contributor Author

With the Fonts Library having Google Fonts and the ability for users to upload font files, I suspect the vast majority of font needs are covered.

I moved the Google fonts integration to the scope of this issue for 3 main reasons:

  • Treating it as any other font collection helps us to standardize the API for other collections.
  • Reduce the scope of Stage 1 and make it easier to handle.
  • Avoid Google fonts-related discussion on the first issue that could delay part of the work.

@matiasbenedetto
Copy link
Contributor Author

I created the issues regarding SVG previews and generated the previews for the Google fonts collection:
#54038
When we try this implementation in the frontend, we could ask meta to host the previews on wporg. We may do that now, but I think it would be useful to test this solution on the frontend first.

@annezazu
Copy link
Contributor

annezazu commented Sep 21, 2023

@matiasbenedetto in chatting with @t-hamano, we noticed that an issue around saving happening in the background exists across both stage 2 and stage 3. IMO, this should be included in stage 2 as part of 6.4. I opened #54698 and it was added to stage 3 but it's a duplicate of #54601 which is listed now in stage 2. Noting here to ensure it's included for stage 2 as it's essentially the same issue :)

@johnstonphilip
Copy link
Contributor

I think we should reconsider including Google Fonts integration in core itself. In my opinion, WordPress should provide everything needed to easily build a Google Fonts plugin (hooks, filters etc) , but not include a full Google Fonts integration directly in core.

Doing so amounts to promotion of Google, Google products, and Google trust. It's a "vote of confidence" from the WordPress project for Google. It's also free marketing for Google.

If Automattic or AwesomeMotive or Godaddy provide good font libraries, could those brands potentially be added to core as well? Or what about other kinds of assets? Is this a one-off or the beginning of brands introducing their products to WP core? This would at least set a precedent for it.

@priethor
Copy link
Contributor

priethor commented Oct 2, 2023

If Automattic or AwesomeMotive or Godaddy provide good font libraries, could those brands potentially be added to core as well?

Indeed! This first step includes Google as a source as a proof of concept, but following iterations can include other font providers that can be enabled/disabled through settings.

@johnstonphilip
Copy link
Contributor

@priethor Sorry, I should have been more clear that I wasn't actually asking that. My main question is this:

Are we willing to say that the WordPress project is giving a "vote of confidence" for Google, the brand? Are we willing to provide free marketing for Google?

@priethor
Copy link
Contributor

priethor commented Oct 2, 2023

I personally don't think that exposing in wp-admin access to the Google fonts directory is going to have a huge impact on them marketing-wise, but I understand your concerns. 😅

In terms of "vote of confidence", the Google fonts directory is one of the largest free directories available, with a large enough infrastructure to be relied on, but in any case, it is not mandatory to use their directory: users are prompted to accept connecting to this directory, so WordPress core is letting the users decide whether they want to use (and trust) the Google directory.

Furthermore, future iterations will allow users to select which directories to use, including those coming from plugins, thanks to the Font Library's extensibility; having Google as the only source is temporary and should not be seen as an intent to promote it. 🙏

@johnstonphilip
Copy link
Contributor

johnstonphilip commented Oct 2, 2023

@priethor That doesn't really answer the question though.

Are we willing to say that the WordPress project is giving a "vote of confidence" for Google, the brand? Because that's what we would be doing.

Furthermore, any other brands we add to WordPress core in the future would also be getting that same "vote of confidence" from the WordPress project. Are we also willing to do it for them?

If so, how are we deciding who gets these "votes of confidence"? Is there a process a brand should go through to earn this vote of confidence? What steps should they take? When do we/they know it's enough?

Adding this opens a can of worms we don't need to open. WordPress has a plugin interface for this exact type of thing. Why not use it? This could surely be made into a plugin, right?

@priethor
Copy link
Contributor

priethor commented Oct 2, 2023

The reasoning behind including directories out of the box is to avoid the need to install plugins to use the functionality. Other directories will still be available through plugins but will not be a must, and the directory will still be opt-out. This reduces the friction for new users, who often find installing plugins for basic web-building stuff confusing.

Looking at this from a different angle, are there any specific concerns around this or other font directories not to include them?

@johnstonphilip
Copy link
Contributor

@priethor I get that it's easier, today, for users and developers to just include Google. But this does open up a political set of problems that others will have to deal with in the future.

I don't think it's true that this Font Library functionality is impossible to use without a plugin. You can manually upload a font without needing a plugin, just like the media library did for years.

The media library now includes Openverse, which actually seems like a more appropriate API to pull fonts from than Google. If any integration were to live in core by default, Openverse seems like the right one.

Looking at this from a different angle, are there any specific concerns around this or other font directories not to include them?

To me this is beside the point, but I'm happy to answer. Google, specifically, doesn't have a great track record for keeping its products alive. The number of products killed by Google here is astounding: https://killedbygoogle.com/

They just sold their domains service to Squarespace, a direct competitor to the WordPress project.

In my opinion, these are reasons enough to be wary of adding Google products and branding directly to WordPress core.

@annezazu
Copy link
Contributor

annezazu commented Oct 2, 2023

The media library now includes Openverse, which actually seems like a more appropriate API to pull fonts from than Google. If any integration were to live in core by default, Openverse seems like the right one.

Agreed! I think in the future fonts could be hosted from Openverse. Adding Google now doesn't preclude that and the same extensibility pathway Google integration is using is what other plugins/integrations can use (including Openverse). Would you be game to open up a meta ticket on that front for Openverse? I'm happy to as well.

Are we willing to say that the WordPress project is giving a "vote of confidence" for Google, the brand? Are we willing to provide free marketing for Google?

This feels like a project leadership level question on a very implementation focused thread. Would you be open to starting that discussion on a Make site perhaps? I feel that's both a better and more visible avenue to get more direction, especially with the future concerns you note. I don't want this to get lost in a GitHub thread 😬.

Separately, reading this over, it seems like part of what might help would be to iterate on this messaging to make it clearer and perhaps nudge folks more to upload manually:

Screenshot 2023-10-02 at 12 12 40 PM

To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site locally for use. If you have any concerns, you can always upload files directly from the Library tab.

That’s in line with this issue in many ways Font library: add support for detailed error messaging in API and UI.

@johnstonphilip
Copy link
Contributor

Thanks @annezazu. I opened a ticket on Make to dicuss removing the Google Fonts integration from WordPress core, and potentially replace it with Openverse instead:
https://core.trac.wordpress.org/ticket/59519#ticket

@priethor
Copy link
Contributor

priethor commented Oct 2, 2023

Thanks, @johnstonphilip, both for the constructive feedback and for following-up with the tickets!

Adding Openverse would indeed be the best match and is definitely something we should look forward to, although Openverse currently doesn't support fonts and depends on Openverse's roadmap and capacity.

To add on top to what Anne said, it's worth noting that in the event Google ceased to support the directory (as you pointed out, the track record is there! 😅 ), it would not affect sites that used it at all, as once downloaded, fonts are served to the users locally.

@johnstonphilip
Copy link
Contributor

Agree, and yeah I agree. I'm not concerned about this breaking, and none of my concerns here are technical. Rather, they are political (I think that's the word), or philosophical in nature. So maybe it's best to shift this part of the conversation to the make ticket so ya'll can stay focused on the technical here. Thanks for the productive conversation!

@azaozz
Copy link
Contributor

azaozz commented Oct 2, 2023

@johnstonphilip

Are we willing to say that the WordPress project is giving a "vote of confidence" for Google, the brand? Because that's what we would be doing.

Furthermore, any other brands we add to WordPress core in the future would also be getting that same "vote of confidence" from the WordPress project. Are we also willing to do it for them?

If so, how are we deciding who gets these "votes of confidence"?

Sorry but seems I may be missing something? Out of the box WordPress supports content (embeds) from several providers/sites: YouTube, Dailymotion, Vimeo, TikTok, Twitter, Reddit, Speaker Deck, TED, etc. etc. The full list can be seen here: https://github.com/WordPress/wordpress-develop/blob/6.3.1/src/wp-includes/class-wp-oembed.php#L53.

How is loading fonts from a Google CDN or mentioning "Google" in that respect any different? :)

@johnstonphilip
Copy link
Contributor

@azaozz I suppose not much is different there, which means they also fit into my questions. I can see that those would also apply to everything I've said. If I started my own video sharing website, what would it take for me to get a dedicated block into WP core? What is the threshold those services met to get dedicated blocks into WP core? Those should probably be part of this conversation I guess.

Is the fact that it's never been a problem mean it never will be a problem and we should ignore it? Maybe. Maybe it has been a problem and we just aren't aware? Maybe we should all just ignore these kinds of things? Thoughts?

@johnstonphilip
Copy link
Contributor

@azaozz I added a comment to the trac ticket about your question so we can continue the conversation over there :)

@annezazu annezazu moved this from In Progress to Punted to 6.5 in WordPress 6.4 Editor Tasks Oct 5, 2023
@matiasbenedetto
Copy link
Contributor Author

I'm closing this issue because this stage was part of the plan to make the font library ready to merge in WordPress core 6.4, but since it was punted to 6.5, we should focus on making it ready for 6.5. This is the new tracking issue: #55277

@matiasbenedetto matiasbenedetto closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@github-project-automation github-project-automation bot moved this from Punted to 6.5 to Done in WordPress 6.4 Editor Tasks Oct 11, 2023
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 [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
No open projects
Status: Done
Development

No branches or pull requests

7 participants