Skip to content

[Fonts API] enqueue programmatically fonts picked in block settings #40386

@zaguiini

Description

@zaguiini

What problem does this address?

Picking a programmatically registered font in the block settings does not enqueue it, unless it's been allow-listed in theme.json[settings][fontFamilies].

What is your proposed solution?

We need to introspect block settings on render and look for font families. Once a family is found, and that font is registered, enqueue it.

Blockers

We only want to work on this after #40362, so only a subset of programmatically registered webfonts show up in the block settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions