diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md
index d153589a2a86e3..2f94308654cf3a 100644
--- a/packages/block-editor/CHANGELOG.md
+++ b/packages/block-editor/CHANGELOG.md
@@ -9,6 +9,7 @@
### Breaking Changes
- The `__next40pxDefaultSize` prop is now true by default. The prop can be safely removed from the following:
+ - `FontFamilyControl` ([#79593](https://github.com/WordPress/gutenberg/pull/79593)).
- `LetterSpacingControl` ([#79533](https://github.com/WordPress/gutenberg/pull/79533)).
- `LineHeightControl` ([#79589](https://github.com/WordPress/gutenberg/pull/79589)).
diff --git a/packages/block-editor/src/components/font-family/README.md b/packages/block-editor/src/components/font-family/README.md
index 1e7eface499711..fa5a0643c761a7 100644
--- a/packages/block-editor/src/components/font-family/README.md
+++ b/packages/block-editor/src/components/font-family/README.md
@@ -28,7 +28,6 @@ const MyFontFamilyControl = () => {
onChange={ ( newFontFamily ) => {
setFontFamily( newFontFamily );
} }
- __next40pxDefaultSize
/>
);
};
@@ -74,11 +73,3 @@ The current font family value.
- Default: ''
The rest of the props are passed down to the underlying `` instance.
-
-#### `__next40pxDefaultSize`
-
-- Type: `boolean`
-- Required: No
-- Default: `false`
-
-Start opting into the larger default height that will become the default size in a future version.
diff --git a/packages/block-editor/src/components/font-family/index.js b/packages/block-editor/src/components/font-family/index.js
index c73eafd8db456c..9ca1a7602ad57e 100644
--- a/packages/block-editor/src/components/font-family/index.js
+++ b/packages/block-editor/src/components/font-family/index.js
@@ -7,7 +7,6 @@ import clsx from 'clsx';
* WordPress dependencies
*/
import { CustomSelectControl } from '@wordpress/components';
-import deprecated from '@wordpress/deprecated';
import { __ } from '@wordpress/i18n';
/**
@@ -16,8 +15,12 @@ import { __ } from '@wordpress/i18n';
import { useSettings } from '../use-settings';
export default function FontFamilyControl( {
- /** Start opting into the larger default height that will become the default size in a future version. */
- __next40pxDefaultSize = false,
+ /**
+ * Start opting into the larger default height that will become the default size in a future version.
+ *
+ * @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
+ */
+ __next40pxDefaultSize: _next40pxDefaultSize,
value = '',
onChange,
fontFamilies,
@@ -45,26 +48,11 @@ export default function FontFamilyControl( {
} ) ),
];
- if (
- ! __next40pxDefaultSize &&
- ( props.size === undefined || props.size === 'default' )
- ) {
- deprecated(
- `36px default size for wp.blockEditor.__experimentalFontFamilyControl`,
- {
- since: '6.8',
- version: '7.1',
- hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.',
- }
- );
- }
-
const selectedValue =
options.find( ( option ) => option.key === value ) ?? '';
return (
onChange( selectedItem.key ) }
diff --git a/packages/block-editor/src/components/font-family/stories/index.story.jsx b/packages/block-editor/src/components/font-family/stories/index.story.jsx
index 6889c5b325b4ee..2f8055988a0521 100644
--- a/packages/block-editor/src/components/font-family/stories/index.story.jsx
+++ b/packages/block-editor/src/components/font-family/stories/index.story.jsx
@@ -49,6 +49,5 @@ export const Default = {
slug: 'system-font',
},
],
- __next40pxDefaultSize: true,
},
};
diff --git a/packages/block-editor/src/components/global-styles/typography-panel.js b/packages/block-editor/src/components/global-styles/typography-panel.js
index 3d134608ab9c73..4dc66d32b8f5ef 100644
--- a/packages/block-editor/src/components/global-styles/typography-panel.js
+++ b/packages/block-editor/src/components/global-styles/typography-panel.js
@@ -605,7 +605,6 @@ export default function TypographyPanel( {
fontFamilies={ fontFamilies }
value={ fontFamily }
onChange={ setFontFamily }
- size="__unstable-large"
/>
) }
@@ -662,7 +661,6 @@ export default function TypographyPanel( {
__unstableInputWidth="auto"
value={ lineHeight }
onChange={ setLineHeight }
- size="__unstable-large"
/>
) }
diff --git a/packages/eslint-plugin/docs/rules/components-no-missing-40px-size-prop.md b/packages/eslint-plugin/docs/rules/components-no-missing-40px-size-prop.md
index deb2a7c2827e82..7e9fc7b3c27f4c 100644
--- a/packages/eslint-plugin/docs/rules/components-no-missing-40px-size-prop.md
+++ b/packages/eslint-plugin/docs/rules/components-no-missing-40px-size-prop.md
@@ -12,7 +12,6 @@ The following components are checked by this rule:
- ComboboxControl
- CustomSelectControl
- FontAppearanceControl
-- FontFamilyControl
- FormFileUpload (special case - see below)
- FormTokenField
- InputControl
diff --git a/packages/eslint-plugin/rules/__tests__/components-no-missing-40px-size-prop.js b/packages/eslint-plugin/rules/__tests__/components-no-missing-40px-size-prop.js
index 1963510492b08e..d73a1b7dcf8d35 100644
--- a/packages/eslint-plugin/rules/__tests__/components-no-missing-40px-size-prop.js
+++ b/packages/eslint-plugin/rules/__tests__/components-no-missing-40px-size-prop.js
@@ -113,7 +113,6 @@ ruleTester.run( 'components-no-missing-40px-size-prop', rule, {
ComboboxControl,
CustomSelectControl,
FontAppearanceControl,
- FontFamilyControl,
FormTokenField,
InputControl,
NumberControl,
@@ -126,7 +125,6 @@ ruleTester.run( 'components-no-missing-40px-size-prop', rule, {
-
diff --git a/packages/eslint-plugin/rules/components-no-missing-40px-size-prop.js b/packages/eslint-plugin/rules/components-no-missing-40px-size-prop.js
index 4d70ab5a3de2fe..ad22f45e3ac877 100644
--- a/packages/eslint-plugin/rules/components-no-missing-40px-size-prop.js
+++ b/packages/eslint-plugin/rules/components-no-missing-40px-size-prop.js
@@ -17,7 +17,6 @@ const COMPONENTS_REQUIRING_40PX = new Set( [
'ComboboxControl',
'CustomSelectControl',
'FontAppearanceControl',
- 'FontFamilyControl',
'FormTokenField',
'IconButton',
'InputControl',
diff --git a/tools/eslint/config.mjs b/tools/eslint/config.mjs
index e33d730c4b8736..b13964fcb2516a 100644
--- a/tools/eslint/config.mjs
+++ b/tools/eslint/config.mjs
@@ -174,6 +174,7 @@ const restrictedSyntax = [
'BorderControl',
'BoxControl',
'FocalPointPicker',
+ 'FontFamilyControl',
'FontSizePicker',
'LetterSpacingControl',
'LineHeightControl',