Font size handling changed significantly between theme.json version 2 and version 3. Understanding these differences is crucial for modern block theme development.
In version 2, setting “fontSizes” to an empty array would override WordPress defaults, and incomplete font size declarations would merge with core values. This created some inconsistencies but was relatively straightforward.
Version 3 requires explicit control through the “defaultFontSizes” flag. Set this to false to disable WordPress defaults and enable your custom font sizes. Without this flag, your custom sizes won’t appear even if properly declared.
When migrating from version 2 to version 3, update your schema version and add “defaultFontSizes: false” to maintain the same behavior. This gives you full control over the font size palette in your block theme.