Skip to main content
2 of 2
added 14 characters in body
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147

Add fontFamily object to theme.json

I have an FSE-related question

  • I'm trying to add a font to the 2023 theme but it's not showing in Gutenberg editor.
  • In theme.json, in the "settings.typography.fontFamilies" section, I added the following fontFamily definition:
{
    "fontFamily": "Sarabun, sans-serif",
    "name": "Sarabun",
    "slug": "sarabun"
},

I realize that this doesn't import the actual font definition files (...woff2), but I think it should at least show "Sarabun" as an option in gutenberg when I edit a Paragraph block and select the "Typography > Font" dropdown.

Note - this does work when I do these steps on the 2022 theme.

QUESTION - Does anyone know why the font (eg "Sarabun") wouldn't be showing?