[wp-trac] [WordPress Trac] #57430: Drop "local($font_family)" CSS while registering font-family in webfonts_handler

WordPress Trac noreply at wordpress.org
Mon Feb 13 14:31:21 UTC 2023


#57430: Drop "local($font_family)" CSS while registering font-family in
webfonts_handler
-------------------------------------------------+-------------------------
 Reporter:  luehrsen                             |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Themes                               |     Version:  trunk
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  gutenberg-merge                                |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55314" 55314]:
 {{{
 #!CommitTicketReference repository="" revision="55314"
 Themes: Remove local() from @font-face styles in
 _wp_theme_json_webfonts_handler().

 Removes adding `local()` as a `@font-face` `src` within
 `_wp_theme_json_webfonts_handler()`.

 Why?

 To fix font incompatibilities when a user has the font-family locally
 installed on their viewing computer or device. It's unknown if all of the
 font-face variations specified by theme.json and/or global styles are:

 * installed on the user's computer/device.
 * and in one file or multiple files.

 The previous implementation used the `src` specified when registering the
 font with the API. That src will likely vary from user computer/device to
 user computer/device.

 To avoid these unknowns which could cause incompatibilities or styling
 issues, this changeset removes adding `local()` to the generated font-face
 CSS styles.

 References:
 * [https://github.com/WordPress/gutenberg/pull/47254 Gutenberg PR 47254]

 Follow-up to [53282].

 Props luehrsen, aristath, ehtmlu, hellofromTonya, wetah.
 Fixes #57430.
 }}}

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


More information about the wp-trac mailing list