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 811d4e66b27a0d..5119ca679e40ad 100644 --- a/packages/edit-site/src/components/global-styles/font-families.js +++ b/packages/edit-site/src/components/global-styles/font-families.js @@ -26,8 +26,14 @@ import { unlock } from '../../lock-unlock'; const { useGlobalSetting } = unlock( blockEditorPrivateApis ); function FontFamilies() { - const { modalTabOpen, setModalTabOpen } = useContext( FontLibraryContext ); + const { baseCustomFonts, modalTabOpen, setModalTabOpen } = + useContext( FontLibraryContext ); const [ fontFamilies ] = useGlobalSetting( 'typography.fontFamilies' ); + const [ baseFontFamilies ] = useGlobalSetting( + 'typography.fontFamilies', + undefined, + 'base' + ); const themeFonts = fontFamilies?.theme ? fontFamilies.theme .map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) ) @@ -40,6 +46,11 @@ function FontFamilies() { : []; const hasFonts = 0 < customFonts.length || 0 < themeFonts.length; + const hasInstalledFonts = + hasFonts || + baseFontFamilies?.theme?.length > 0 || + baseCustomFonts?.length > 0; + return ( <> { !! modalTabOpen && ( @@ -89,7 +100,11 @@ function FontFamilies() { { ! hasFonts && ( { __( 'Fonts' ) } - { __( 'No fonts installed.' ) } + + { hasInstalledFonts + ? __( 'No fonts activated.' ) + : __( 'No fonts installed.' ) } + ) }