I've added my own font to the theme that I'm working on with the help of the theme.json file like this:
"typography": {
"customFontSize": true,
"customLineHeight": true,
"fontFamilies": [
{
"fontFamily": "'Mulish', sans-serif",
"name": "Mulish",
"slug": "mulish",
"fontFace": [
{
"fontFamily": "Mulish",
"fontWeight": "400",
"fontStyle": "normal",
"fontStretch": "normal",
"src": [ "file:./assets/fonts/Mulish-VariableFont_wght.woff2" ]
}
]
}
]
},
When editing a block which support typography settings the custom font is shown. But by default content is shown in the 'default' style which is plain 'serif'. When changing it to the custom font it shows the custom font in the editor.
I can't find a way to remove the 'default' font option and to show the content in the editor by default with the custom font.
When searching for a solution I found this article (https://www.paulchinmoy.com/change-gutenberg-editors-default-font/) but that feels like a hack. And only works when you use a single custom font.
Is there a way to remove the default setting and styling of content in the block editor? And only use the custom font(s) which are used in the theme.json file?