[wp-trac] [WordPress Trac] #59165: Font Face: Server-side @font-face styles generator and printer
WordPress Trac
noreply at wordpress.org
Mon Sep 25 21:28:06 UTC 2023
#59165: Font Face: Server-side @font-face styles generator and printer
-------------------------------------------------+-------------------------
Reporter: hellofromTonya | Owner:
| hellofromTonya
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: gutenberg-merge needs-dev-note has- | Focuses:
patch has-unit-tests has-testing-info has- |
screenshots commit |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"56688" 56688]:
{{{
#!CommitTicketReference repository="" revision="56688"
Fonts: Get font-family name from 'fontFamily' field.
Instead of getting the name from the optional `'name'` field, the font-
family name now comes from the required `'fontFamily'` field.
This change fixes a back-compat (BC) break in how the font-family name is
pulled from the incoming font data in the `WP_Font_Face_Resolver`.
Why?
WP Core does not require the `'name'` field in theme.json. For themes that
do not declare it, that set of font variations is ignored, thus causing a
BC break from how the stopgap code worked (see [53282]).
However, `WP_Theme_JSON` schema does require the `fontFamily` field in
each of the `typography.fontFamilies`.
== Other details:
Includes a parser to extract the first entry when a `fontFamily` field has
a comma-separated list of font-families, e.g. `Inter, sans-serif`.
References:
* Merge from Gutenberg's PR
https://github.com/WordPress/gutenberg/pull/54615.
Follow-up to [56500], [53282].
Props ironprogrammer, hellofromTonya, mmaattiiaass, pbking.
Fixes #59165.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59165#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list