WPDev.one
Core Class

WP_Font_Face_Resolver

class WP_Font_Face_Resolver // Constructor: function Object() { [native code] }

The Font Face Resolver abstracts the processing of different data sources

Methods 7 methods

Method / Return Description
get_fonts_from_theme_json()
array

Gets fonts defined in theme.json.

get_fonts_from_style_variations()
array

Gets fonts defined in style variations.

parse_settings()
array

Parse theme.json settings to extract font definitions with variations grouped by font-family.

Parameters: $settings: array
maybe_parse_name_from_comma_separated_list()
string

Parse font-family name from comma-separated lists.

Parameters: $font_family: mixed
convert_font_face_properties()
array

Converts font-face properties from theme.json format.

Parameters: $font_face_definition: array, $font_family_property: mixed
to_theme_file_uri()
array

Converts each 'file:./' placeholder into a URI to the font file in the theme.

Parameters: $src: array
to_kebab_case()
array

Converts all first dimension keys into kebab-case.

Parameters: $data: array

Class Information

Source File
wp-includes/fonts/class-wp-font-face-resolver.php
Advertisement