Skip to content

[Fonts API] Do not expose registered fonts in block settings (only expose enqueued fonts) #40362

@zaguiini

Description

@zaguiini

What problem does this address?

Right now, the Fonts API is exposing registered fonts in the typography picker. That is fine for Site Editor's (Global Styles > Typography UI), but block settings should not see them.

There are 3 places where font families are relevant:

  • global styles font presets (this doesn’t have a UI in core yet);
  • global elements & block types;
  • block instances.

The first two (which represent the global styles UI) should be able to read and select from all registered fonts. Block instances (i.e. selecting a paragraph block in a post), on the other hand, should only get access to fonts enabled through the previous two UIs (presets, elements, and block type enabled font families).

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions