[wp-trac] [WordPress Trac] #56078: PHP Warning when adding fonts to fontFamilies in wp_global_styles post

WordPress Trac noreply at wordpress.org
Mon Aug 21 16:10:34 UTC 2023


#56078: PHP Warning when adding fonts to fontFamilies in wp_global_styles post
---------------------------+---------------------------------------
 Reporter:  domainsupport  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Editor         |     Version:  6.0
 Severity:  normal         |  Resolution:  wontfix
 Keywords:                 |     Focuses:  administration, template
---------------------------+---------------------------------------

Comment (by hellofromTonya):

 Replying to [comment:18 domainsupport]:
 > Hi @hellofromTonya, bearing in mind the status of the Fonts API and the
 stopgap code is still currently being used ... can this bug please be re-
 appraised and possibly fixed?
 >
 > I would be happy to create a patch that uses a function to replace
 `array_unique()` for this multi-dimensional array?

 Hello @domainsupport,

 I originally closed the ticket because within Core at this time, injecting
 fonts is doing it wrong:
 >Injecting fonts is doing it wrong at this time, as the stopgap does not
 support nor was it designed for any fonts other than those in the active
 theme's `theme.json` file.

 >I'm closing this ticket as `wontfix` since the injecting fonts is not
 supported nor intended.

 The direction of fonts has changed since last we spoke. Give me a moment
 to share.

 Planned in 6.4 is a new font management system which will include:

 * Font Library: the UI/UX for managing fonts including previewing,
 uploading, activating, and deactivating. Google Fonts (served locally in
 `wp-content/uploads/fonts/`) is bundled into it.
 * [https://github.com/WordPress/gutenberg/issues/41479 Font Face]: the
 server-side generator and printer of the `@font-face` styles for the fonts
 the user activates in the Font Library.

 This new system is being developed and tested in the Gutenberg repo. I
 invite you to follow along and contribute:

 - [https://github.com/WordPress/gutenberg/issues/52698 Font Library -
 Stage 1: Google and Local fonts]
 - [https://github.com/WordPress/gutenberg/issues/53307 Font Library -
 Stage 2: Fonts Library extensions] which will be an API to allow plugins /
 themes to add font collections for user consideration within the Font
 Library.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56078#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list