Make WordPress Core


Ignore:
Timestamp:
02/27/2024 12:04:55 PM (9 months ago)
Author:
youknowriad
Message:

Font face resolver: print font faces from font families defined in all theme.json origins.

This commit updates the theme.json style generation to allow a font family name to be repeated across theme.json origins (default, theme, custom).

Props mmaattiiaass, hellofromtonya, arthur791004, ironprogrammer.
Fixes #60605.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/fonts.php

    r57686 r57720  
    1414 *
    1515 * @param array[][] $fonts {
    16  *     Optional. The font-families and their font variations. Default empty array.
    17  *
    18  *     @type string $font-family => array[] $variations {
    19  *         Optional. An associated array of font variations for this font-family.
    20  *         Each variation has the following structure.
    21  *
    22  *         @type array $font_variation {
     16 *     Optional. The font-families and their font faces. Default empty array.
     17 *
     18 *     @type array {
     19 *         An indexed or associative (keyed by font-family) array of font variations for this font-family.
     20 *         Each font face has the following structure.
     21 *
     22 *         @type array {
    2323 *             @type string          $font-family             The font-family property.
    2424 *             @type string|string[] $src                     The URL(s) to each resource containing the font data.
Note: See TracChangeset for help on using the changeset viewer.