close
Skip to content

Show Font Family control by default in block inspector#78566

Open
dhananjaykuber wants to merge 1 commit into
WordPress:trunkfrom
dhananjaykuber:fix/typography-font-family-default-visible
Open

Show Font Family control by default in block inspector#78566
dhananjaykuber wants to merge 1 commit into
WordPress:trunkfrom
dhananjaykuber:fix/typography-font-family-default-visible

Conversation

@dhananjaykuber
Copy link
Copy Markdown
Contributor

What?

Closes #56373

Makes the Font Family control visible by default in the Typography panel of the block inspector.

Why?

Font Family is a setting many users want to change, but it was difficult to find. Blocks like Paragraph and Heading define their own __experimentalDefaultControls (e.g. { fontSize: true }), which completely overrode the Typography panel's DEFAULT_CONTROLS fallback inadvertently hiding Font Family unless the user manually enabled it from the "options" menu.

How?

In packages/block-editor/src/hooks/typography.js, instead of passing the block's __experimentalDefaultControls directly to StylesTypographyPanel, we now merge fontFamily: true as a baseline before spreading the block's own overrides:

const defaultControls = blockDefaultControls
    ? { fontFamily: true, ...blockDefaultControls }
    : undefined;

This ensures Font Family is shown by default for all blocks that support it. Blocks can still explicitly opt out by setting fontFamily: false in their __experimentalDefaultControls.

Testing Instructions

  1. Open a post or page in the editor.
  2. Insert a Paragraph block.
  3. Open the block Inspector (right sidebar) → Typography panel.
  4. Verify that Font Family is visible by default (without needing to click the ⋮ menu to enable it).
  5. Repeat steps 2–4 with a Heading block.
  6. To confirm opt-out still works: add "fontFamily": false to a block's __experimentalDefaultControls in [block.json] and verify the control is hidden.

Testing Instructions for Keyboard

  1. Focus the Paragraph block using keyboard navigation.
  2. Press Tab to move into the Inspector sidebar.
  3. Navigate to the Typography panel and expand it.
  4. Confirm the Font Family control is reachable and visible without any additional steps.

Screenshots

Screenshot 2026-05-22 at 4 37 42 PM

@github-actions
Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions github-actions Bot added the [Package] Block editor /packages/block-editor label May 22, 2026
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dhananjaykuber <dhananjaykuber@git.wordpress.org>
Co-authored-by: creativecoder <grantmkin@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@dhananjaykuber dhananjaykuber changed the title feat: show Font Family control by default in block inspector Show Font Family control by default in block inspector May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typography: Font Family on by default?

1 participant