diff --git a/packages/edit-site/src/components/global-styles/font-families.js b/packages/edit-site/src/components/global-styles/font-families.js index 06bf5953283323..7a7597878eacd1 100644 --- a/packages/edit-site/src/components/global-styles/font-families.js +++ b/packages/edit-site/src/components/global-styles/font-families.js @@ -26,6 +26,8 @@ function FontFamilies() { const { modalTabOpen, toggleModal, themeFonts, customFonts } = useContext( FontLibraryContext ); + const hasFonts = 0 < customFonts.length || 0 < themeFonts.length; + return ( <> { !! modalTabOpen && ( @@ -51,14 +53,18 @@ function FontFamilies() { - - { customFonts.map( ( font ) => ( - - ) ) } - { themeFonts.map( ( font ) => ( - - ) ) } - + { hasFonts ? ( + + { customFonts.map( ( font ) => ( + + ) ) } + { themeFonts.map( ( font ) => ( + + ) ) } + + ) : ( + <>{ __( 'No fonts installed.' ) } + ) } );