You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I try to upload fonts in woff2 format, I get the error message.
Invalid parameter(s): font_family_settings
I found out the reason why this is happening is because the font name is missing in the metadata of the font. https://fontdrop.info/
As per w3.org specification the name in the metadata is optional, so this is a valid bug of Gutenberg:
WOFF2:
The WOFF2 file MAY contain a block of extended metadata. The interpretation of this block is exactly the same as [WOFF 1]. https://www.w3.org/TR/WOFF2/#Metadata
WOFF1:
Zero or more name elements may be used to provide a human-friendly name for the collection of extended metadata items in an extension element. A user agent that displays metadata SHOULD choose the name with most the appropriate language from among those available for each named extension element. This child element is OPTIONAL in extension elements; anonymous extension elements are also permissible. https://www.w3.org/TR/2012/REC-WOFF-20121213/#Metadata
We need some kind of unique identifier for the font family before it can be created. So the best way forward seems like finding one or more fallbacks from the font metadata to use for the font family slug when the name isn't present, and then submitting that as the slug in the API request to create the font family.
Maybe the first upload of the font should fail if there is no unique identifier and return a new submission form, this time with a "name" field.
The loading indicator is stuck when a font with no name is uploaded.
The originally reported error is returned when the font name metadata contains invalid characters.
Description
As I try to upload fonts in woff2 format, I get the error message.
Invalid parameter(s): font_family_settings
I found out the reason why this is happening is because the font name is missing in the metadata of the font. https://fontdrop.info/
As per w3.org specification the name in the metadata is optional, so this is a valid bug of Gutenberg:
WOFF2:
The WOFF2 file MAY contain a block of extended metadata. The interpretation of this block is exactly the same as [WOFF 1].
https://www.w3.org/TR/WOFF2/#Metadata
WOFF1:
Zero or more name elements may be used to provide a human-friendly name for the collection of extended metadata items in an extension element. A user agent that displays metadata SHOULD choose the name with most the appropriate language from among those available for each named extension element. This child element is OPTIONAL in extension elements; anonymous extension elements are also permissible.
https://www.w3.org/TR/2012/REC-WOFF-20121213/#Metadata
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Screenshots and bug reports at: https://core.trac.wordpress.org/ticket/61426
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: