Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update preview key location to match new schema #16

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

mikachan
Copy link
Member

This PR updates the preview key location in line with recent changes to the font collection schema in WordPress/gutenberg#58413.

The schema has been changed to the following structure:

		{
			"preview": "https://s.w.org/images/fonts/17.6/previews/abeezee/abeezee.svg",
			"font_family_settings": {
				"name": "ABeeZee",
				"fontFamily": "ABeeZee, sans-serif",
				"slug": "abeezee"
			},
			"categories": [ "sans-serif" ],
			"font_faces": [
				{
					"preview": "https://s.w.org/images/fonts/17.6/previews/abeezee/abeezee-400-normal.svg",
					"font_face_settings": {
						"src": "https://fonts.gstatic.com/s/abeezee/v22/esDR31xSG-6AGleN6teukbcHCpE.woff2",
						"fontWeight": "400",
						"fontStyle": "normal",
						"fontFamily": "ABeeZee"
					}
				}
			]
		}

Note that the preview for the font family now sits on the top level, and the preview for each font face sits next to a new key which describes each font face, font_face_settings.

I also ran the files and previews script again, which included a few updates from Google Fonts.

# Conflicts:
#	releases/gutenberg-17.6/collections/google-fonts-with-preview.json
#	releases/gutenberg-17.6/collections/google-fonts.json
@mikachan mikachan changed the title Update preview key location Update preview key location to match new schema Jan 30, 2024
Copy link
Collaborator

@matiasbenedetto matiasbenedetto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ The JSON files match the new schema.
The change looks good to me.

@mikachan mikachan merged commit fb70ae2 into main Jan 30, 2024
@mikachan mikachan deleted the update/move-preview-key branch January 30, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants