Generates and prints font-face styles for given fonts or theme.json fonts.
Parameters
$fontsarray[][]optional
The font-families and their font faces. Default empty array. @type array ...$0 { An indexed or associative (keyed by font-family) array of font variations for this font-family. Each font face has the following structure. @type array ...$0 { The font face properties.Default: array()
$fontstring
-family The font-family property.
$srcstring|string[]
The URL(s) to each resource containing the font data.
$fontstringdefault: 'normal'
-style Optional. The font-style property.
$fontstringdefault: '400'
-weight Optional. The font-weight property.
$fontstringdefault: 'fallback'
-display Optional. The font-display property.
$ascentstring
-override Optional. The ascent-override property.
$descentstring
-override Optional. The descent-override property.
$fontstring
-stretch Optional. The font-stretch property.
$fontstring
-variant Optional. The font-variant property.
$fontstring
-feature-settings Optional. The font-feature-settings property.
$fontstring
-variation-settings Optional. The font-variation-settings property.
$linestring
-gap-override Optional. The line-gap-override property.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/fonts.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.