diff --git a/packages/edit-site/src/components/global-styles/utils.js b/packages/edit-site/src/components/global-styles/utils.js index 4f6ee37dc32629..66a25854a06fe1 100644 --- a/packages/edit-site/src/components/global-styles/utils.js +++ b/packages/edit-site/src/components/global-styles/utils.js @@ -52,20 +52,19 @@ function getFontFamilyFromSetting( fontFamilies, setting ) { } export function getFontFamilies( themeJson ) { - const fontFamilies = themeJson?.settings?.typography?.fontFamilies.theme; - // const themeFontFamilies = - // themeJson?.settings?.typography?.fontFamilies?.theme; - // const customFontFamilies = - // themeJson?.settings?.typography?.fontFamilies?.custom; + const themeFontFamilies = + themeJson?.settings?.typography?.fontFamilies?.theme; + const customFontFamilies = + themeJson?.settings?.typography?.fontFamilies?.custom; - // let fontFamilies = []; - // if ( themeFontFamilies && customFontFamilies ) { - // fontFamilies = [ ...themeFontFamilies, ...customFontFamilies ]; - // } else if ( themeFontFamilies ) { - // fontFamilies = themeFontFamilies; - // } else if ( customFontFamilies ) { - // fontFamilies = customFontFamilies; - // } + let fontFamilies = []; + if ( themeFontFamilies && customFontFamilies ) { + fontFamilies = [ ...themeFontFamilies, ...customFontFamilies ]; + } else if ( themeFontFamilies ) { + fontFamilies = themeFontFamilies; + } else if ( customFontFamilies ) { + fontFamilies = customFontFamilies; + } const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily; const bodyFontFamily = getFontFamilyFromSetting( fontFamilies,