Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Control Typography in WordPress With theme.json

A practical guide to theme.json typography: separate settings from styles, register families and sizes, use preset variables, build fluid scales, and handle version-3 compatibility.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use theme.json in two stages: define the typography features and reusable presets under settings.typography, then apply those presets as defaults under styles.typography. This separation lets a block theme (and supported classic-theme configurations) expose controlled font, size, spacing, and responsive options in the editor without scattering CSS across templates.

The practical pattern is to register families in settings.typography.fontFamilies, register sizes in settings.typography.fontSizes, reference them with var:preset|… tokens, and choose whether WordPress should generate fluid values. A complete setup also needs a deliberate choice about custom editor values, the version-3 defaultFontSizes setting, and the WordPress versions your theme supports.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How theme.json separates typography settings from styles

theme.json is WordPress’s configuration file for global settings and styles. The settings tree describes what the editor can offer; the styles tree consumes those capabilities to establish defaults. Mixing up these roles is the most common reason a font or size appears in code but not in the editor.

settings.typography: capabilities and presets

Use settings.typography to enable controls and register reusable values. The typography reference includes switches and presets for custom font size, font style, font weight, fluid sizing, letter spacing, line height, text decoration, text transform, drop caps, writing mode, font sizes, and font families. A setting can expose a control without forcing every block to use it.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

styles.typography: the defaults visitors see

Use styles.typography for the site-wide default font family, size, line height, weight, spacing, decoration, transform, and related properties. Styles can also be placed deeper in the style tree to target a block or element. A registered preset is referenced with a token such as var:preset|font-size|body, not by repeating the raw value in every rule.

What WordPress generates

Each family slug becomes a custom property named --wp--preset--font-family--{slug}. Each size slug becomes --wp--preset--font-size--{slug} and a corresponding preset class. Slugs are therefore part of your theme’s public design-system API: changing one can invalidate saved content or custom CSS that uses the generated names.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a theme.json version and create the file

Start with a version that matches the features and WordPress releases you intend to support. The examples below use version 3 and the official schema URL, which gives editor tooling and validation a precise vocabulary:

{
  "$schema": "https://schemas.wp.org/trunk/theme.json",
  "version": 3,
  "settings": {
    "typography": {}
  },
  "styles": {
    "typography": {}
  }
}

Keep the file at the theme root. Validate the JSON before activating the theme; one trailing comma or mismatched quote prevents WordPress from reading the entire configuration, which can look like several unrelated typography controls have disappeared.

Build a practical typography foundation

The following starter configuration defines a system stack, a fixed body size, a display size with an explicit CSS formula, and a lead size whose bounds are supplied to WordPress. It also enables line-height controls while disallowing arbitrary custom sizes.

{
  "$schema": "https://schemas.wp.org/trunk/theme.json",
  "version": 3,
  "settings": {
    "typography": {
      "customFontSize": false,
      "lineHeight": true,
      "fluid": true,
      "fontFamilies": [
        {
          "name": "System Sans",
          "slug": "system-sans",
          "fontFamily": "-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif"
        }
      ],
      "fontSizes": [
        {
          "name": "Body",
          "slug": "body",
          "size": "1rem",
          "fluid": false
        },
        {
          "name": "Display",
          "slug": "display",
          "size": "clamp(2rem, 1.25rem + 3vw, 4rem)",
          "fluid": false
        },
        {
          "name": "Lead",
          "slug": "lead",
          "size": "1.25rem",
          "fluid": { "min": "1.125rem", "max": "1.5rem" }
        }
      ]
    }
  },
  "styles": {
    "typography": {
      "fontFamily": "var:preset|font-family|system-sans",
      "fontSize": "var:preset|font-size|body",
      "lineHeight": "1.6"
    }
  }
}

The name is the human-readable label, slug is the stable identifier, and size is the CSS value. Registering a value does not automatically make it the site default; the reference in styles does that.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Register font families

System and existing stacks

A system stack needs no font files. Register the complete CSS family list so the editor can offer one label while browsers use the appropriate installed face:

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
{
  "name": "System Sans",
  "slug": "system-sans",
  "fontFamily": "-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif"
}

Use lowercase, predictable slugs and keep them stable across theme updates. The slug is what appears in preset references and generated custom-property names; the display name can change without changing those references.

Bundle a theme-owned web font

For a font supplied with the theme, keep the family in fontFamilies and add a fontFace array. The face metadata and source files belong to the family object:

{
  "name": "Brand Sans",
  "slug": "brand-sans",
  "fontFamily": ""Brand Sans", sans-serif",
  "fontFace": [
    {
      "fontFamily": "Brand Sans",
      "fontStyle": "normal",
      "fontWeight": "400 700",
      "src": [
        "file:./assets/fonts/brand-sans.woff2"
      ]
    }
  ]
}

Place the referenced file at the matching path inside the theme. A range such as 400 700 describes the weights covered by that variable font; separate static files can be represented by additional face entries with their own weight values. Use one family slug for all variations so preset references remain predictable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Licensing and file-hosting obligations remain your responsibility. WordPress’s configuration format does not grant permission to redistribute a commercial font, and a remote provider is not required when a system stack meets the design brief.

Register a controlled size scale

Define every size you want authors to select in settings.typography.fontSizes. Each object requires name, slug, and size; fluid is optional. A small, intentional scale is easier to maintain than dozens of near-duplicate values.

Field Purpose Example
name Label displayed in the editor Body
slug Stable preset identifier and part of the generated variable body
size CSS value used when the preset is applied 1rem
fluid Per-size responsive behavior false or an object with min and max

After registration, a block’s typography control can use the preset, and theme CSS can refer to var(--wp--preset--font-size--body) where a raw CSS custom property is needed. In theme.json style values, prefer the portable var:preset|font-size|body token.

Fixed and formula-based values

Set fluid to false for a value that should remain constant, such as a compact label or a body size chosen in relative units. You can also put a complete clamp() expression directly in size when the design system already specifies the exact interpolation:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
{
  "name": "Display",
  "slug": "display",
  "size": "clamp(2rem, 1.25rem + 3vw, 4rem)",
  "fluid": false
}

Marking this preset non-fluid prevents WordPress from trying to regenerate the formula. The browser still evaluates the supplied clamp().

Make font sizes responsive with fluid typography

Enable fluid behavior globally

Set settings.typography.fluid to true to ask WordPress to generate viewport-based scaling for eligible registered sizes. WordPress calculates a clamp() value from minimum and maximum bounds. A size below the default minimum can remain static, so inspect the generated result rather than assuming every preset will scale.

{
  "settings": {
    "typography": {
      "fluid": true
    }
  }
}

Opt out for one preset

Override the global choice when a particular label must not change across viewports:

{
  "name": "Small",
  "slug": "sm",
  "size": "1rem",
  "fluid": false
}

Set explicit minimum and maximum bounds

An object gives a preset its own responsive limits:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "name": "Heading",
  "slug": "heading",
  "size": "2rem",
  "fluid": {
    "min": "1.75rem",
    "max": "3.5rem"
  }
}

Use explicit bounds for headings that need a known mobile floor and desktop ceiling. Use a literal clamp() when your design formula, rather than WordPress’s calculation, is the source of truth.

Apply typography defaults with preset references

Set the global family, size, and line height in styles.typography. The following references the registered slugs from the starter configuration:

{
  "styles": {
    "typography": {
      "fontFamily": "var:preset|font-family|system-sans",
      "fontSize": "var:preset|font-size|body",
      "lineHeight": "1.6"
    }
  }
}

A preset reference is preferable to duplicating 1rem or a long font stack: changing the registered value updates every consumer that points to the preset. Keep the global default conservative, then assign display or lead presets where the content structure calls for them.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Scope a different default to a block or element

The broader style tree can target individual blocks and elements. Use that scope when a heading needs the display preset but paragraphs should retain the body default. The exact block or element path depends on the design, but the value still uses the same preset token:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "styles": {
    "blocks": {
      "core/heading": {
        "typography": {
          "fontSize": "var:preset|font-size|display"
        }
      }
    }
  }
}

Block-specific styles are defaults, not immutable content. An editor control can override them when that control is enabled and the block supports the property.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Decide which editor controls authors should have

Typography controls are independent decisions. Enable only what authors can use consistently, and provide presets for values that should stay within the design system.

Decision Theme.json choice Result
Allow arbitrary font sizes customFontSize: true Authors can enter values beyond the registered scale.
Enforce the registered scale customFontSize: false Authors choose presets instead of free-form sizes.
Expose line-height editing lineHeight: true Supported blocks can offer line-height controls.
Offer fluid sizing fluid: true or per-size settings Eligible presets receive responsive calculations.

Other typography booleans cover font style, weight, letter spacing, decoration, transform, drop caps, and writing mode. Their availability and defaults are version-dependent, so define the capability deliberately rather than relying on an assumed default.

Keep version 3 default font sizes under control

Version 3 adds the settings.typography.defaultFontSizes decision. When it is true, core default sizes remain visible and cannot be overridden by the theme. When it is false, those defaults are hidden and the theme can use the default slugs for its own scale.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "version": 3,
  "settings": {
    "typography": {
      "defaultFontSizes": false,
      "fontSizes": [
        {
          "name": "Body",
          "slug": "body",
          "size": "1rem"
        }
      ]
    }
  }
}

Choose true when compatibility with the core scale matters or authors should retain those familiar options. Choose false when the theme’s named scale must be the only source of size presets. Test the editor after changing this value because the visible list, preset slugs, and any saved content that references those slugs can change.

Why typography controls are missing

The setting was never enabled

Registering a font or size does not automatically expose every control. Check the relevant boolean under settings.typography, such as lineHeight or customFontSize, and confirm the block supports that property.

The JSON is invalid or in the wrong place

Run the file through a JSON validator and confirm it is the active theme’s root-level theme.json. A syntax error causes WordPress to ignore the configuration, while editing a parent theme’s file has no effect when a child theme is active.

The preset reference does not match the slug

Compare every var:preset|font-family|… and var:preset|font-size|… token with the exact registered slug. The human-readable name is not used in the reference, and changing capitalization or punctuation in a slug creates a different preset.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Core defaults are masking the theme scale

On version 3, inspect defaultFontSizes. A value of true intentionally keeps core sizes visible and prevents overriding them; this can make a theme’s replacement scale appear incomplete.

The installed WordPress release lacks the property

Support for typography properties is not identical across releases. Newer properties, including textIndent, textShadow, and some later typography controls, were added over time. Check the style-property support for the oldest WordPress version in your support range and avoid depending on a property it does not understand.

A block or editor context does not support the control

Global settings do not force every block to display every option. Test the same preset in a paragraph, heading, and any custom block you support. If only one block is missing a control, the limitation is block support rather than the global registration.

Use a repeatable implementation workflow

  1. Set the support target. Record the minimum WordPress release, theme type, and whether version 3 features are required.
  2. Define the vocabulary. Choose stable family and size slugs, labels, units, and a small scale before writing style references.
  3. Register families. Add system stacks or licensed, theme-owned files under fontFamilies; verify each file: path exists.
  4. Register sizes. Add fixed, fluid, or formula-based values under fontSizes and decide whether core defaults stay visible.
  5. Enable capabilities. Turn on only the controls authors need, including line height, custom size, and fluid behavior.
  6. Apply defaults. Reference the slugs from styles.typography, then add block or element overrides where the layout requires them.
  7. Validate and inspect. Check JSON syntax, activate the intended theme, and inspect the editor’s typography panel for each supported block.
  8. Test responsive output. View fluid presets at narrow and wide widths, confirm the minimum and maximum behavior, and check that fixed presets remain fixed.
  9. Test an upgrade path. Change a preset value in a staging copy and verify existing content still resolves the same slug and displays the intended family or size.

Typography decisions that prevent future conflicts

Design requirement Recommended approach Reason
Fast, dependency-free text Register a system stack No font files or redistribution license are needed.
Consistent branded lettering Bundle a licensed web font with fontFace The theme controls the files and face metadata.
Predictable editorial rhythm Use named presets and set customFontSize to false Authors stay within the approved scale.
Readable headings on every viewport Use per-size fluid bounds or a deliberate clamp() Mobile and desktop limits are explicit.
Different hierarchy by block Keep a global body default and scope heading styles under the block tree Overrides remain centralized and editable.
Broad release compatibility Limit properties to the oldest supported WordPress version Unsupported properties cannot silently become required behavior.

When a control is absent, diagnose in this order: valid active file, registered slug, enabled setting, block support, then WordPress-version support. That sequence separates configuration errors from intentional editor limitations and avoids replacing a working preset system with ad-hoc CSS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.