[wp-trac] [WordPress Trac] #56310: Inconsistency when adding fonts to fontFamilies in wp_global_styles post

WordPress Trac noreply at wordpress.org
Sat Jul 30 07:49:47 UTC 2022


#56310: Inconsistency when adding fonts to fontFamilies in wp_global_styles post
---------------------------+-----------------------------
 Reporter:  domainsupport  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Editor         |    Version:  trunk
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 When fonts are added to the theme settings saved in a `wp_global_styles`
 post, they are processed differently by the FSE Global Styles editor than
 they are by `script-loader.php`

 The FSE Global Styles looks to see if the `fontFamilies` node exists and
 if it does then the fonts there are used to populate the "Font Family"
 dropdown in Global Styles overriding and ignoring any fonts outlined in
 `fontFamilies` in the theme's `theme.json`

 However, when the fonts are processed by `/wp-includes/script-loader.php`,
 the opposite happens ... the fonts in the `wp_global_styles` post are
 completely ignored and only the fonts in `theme.json` are added to `wp-
 webfonts` inline styles.

 I would have expected this to be consistent and for the fonts in the
 `wp_global_styles` post to be processed and for the ones in `theme.json`
 to be ignored as per the behaviour in the FSE Global Styles editor?

 Oliver

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56310>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list