Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#64679 new enhancement

Add option in dashboard font management screen to include external font libraries/apis

Reported by: amykamala's profile amykamala Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description (last modified by amykamala)

The new font library management page in WP 7.0 currently (as of Beta 1) has two options: manage fonts already imported, or upload new fonts.

There should be a third option to use external font libraries or APIs for including fonts.

Uploading and managing existing fonts is extremely useful, and the average user will benefit. Web developers however typically use external font libraries / APIs to leverage fonts in web pages rather than uploading font files, with methods like an embed or @include directive in <head>. Like this:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">

or

<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
</style>

WordPress themes often have options for including external fonts, but using those methods means the use of the font is not theme-agnostic.

A third option for using external font library/api includes could help alleviate theme dependency, reduce the potential for website bloat from uploading font files, and would be a useful tool for devs.

Edit to add: Or maybe this would be better on the (soon to be created) new API connectors page

(I did not find any tickets for this but apologize if it's a duplicate!)

Change History (1)

#1 @amykamala
7 weeks ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.