Skip to content

Commit

Permalink
Revert "Font Library: Group fonts by source (#63211)" (#65590)
Browse files Browse the repository at this point in the history
* Revert "Font Library: Group fonts by source (#63211)"

* update typography screen description

* update screen description

Co-authored-by: vcanales <vcanales@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>
  • Loading branch information
5 people authored Sep 30, 2024
1 parent 743144b commit 66bd5e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
33 changes: 5 additions & 28 deletions packages/edit-site/src/components/global-styles/font-families.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { __, _x } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
import {
__experimentalText as Text,
__experimentalItemGroup as ItemGroup,
Expand Down Expand Up @@ -61,14 +61,9 @@ function FontFamilies() {
) }

<VStack spacing={ 4 }>
{ themeFonts.length > 0 && (
<VStack>
<Subtitle level={ 3 }>
{
/* translators: Heading for a list of fonts provided by the theme. */
_x( 'Theme', 'font source' )
}
</Subtitle>
{ [ ...themeFonts, ...customFonts ].length > 0 && (
<>
<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
<ItemGroup size="large" isBordered isSeparated>
{ themeFonts.map( ( font ) => (
<FontFamilyItem
Expand All @@ -77,25 +72,7 @@ function FontFamilies() {
/>
) ) }
</ItemGroup>
</VStack>
) }
{ customFonts.length > 0 && (
<VStack>
<Subtitle level={ 3 }>
{
/* translators: Heading for a list of fonts installed by the user. */
_x( 'Custom', 'font source' )
}
</Subtitle>
<ItemGroup size="large" isBordered isSeparated>
{ customFonts.map( ( font ) => (
<FontFamilyItem
key={ font.slug }
font={ font }
/>
) ) }
</ItemGroup>
</VStack>
</>
) }
{ ! hasFonts && (
<VStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function ScreenTypography() {
<ScreenHeader
title={ __( 'Typography' ) }
description={ __(
'Typography styles and the application of those styles on site elements.'
'Available fonts, typographic styles, and the application of those styles.'
) }
/>
<div className="edit-site-global-styles-screen">
Expand Down

0 comments on commit 66bd5e2

Please sign in to comment.