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

Font Library: Uploaded custom font not included in exported Block Theme #57801

Closed
bfintal opened this issue Jan 12, 2024 · 1 comment
Closed
Labels
[Feature] Typography Font and typography-related issues and PRs Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended

Comments

@bfintal
Copy link
Contributor

bfintal commented Jan 12, 2024

Description

The custom font I've uploaded isn't included when exporting the Block Theme. The custom font is still selected in style typography settings though.

Step-by-step reproduction instructions

  1. Open nightly in Playground: https://playground.wordpress.net/?wp=nightly&plugin=gutenberg
  2. Go to Site Editor and upload a custom font
  3. Use the custom font for headings
  4. Export the theme
  5. Open a fresh site and install and activate the exported theme
  6. See that the uploaded font is not there

Screenshots, screen recording, code snippet

If you check the exported theme.json, the font file is not found in there - it's source is referenced from the original. For example, I've uploaded a copy of DM Sans:

{
	"fontFace": [
		{
			"fontFamily": "DM Sans",
			"fontStyle": "normal",
			"fontWeight": "100 1000",
			"src": "https://playground.wordpress.net/scope:0.0731139000825751/wp-content/fonts/dm-sans_normal_100-1000.ttf"
		}
	],
	"fontFamily": "'DM Sans'",
	"name": "DM Sans",
	"slug": "dm-sans"
}

Environment info

https://playground.wordpress.net/?wp=nightly&plugin=gutenberg

  • WordPress 6.5-alpha-57272
  • Gutenberg 17.4.1

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

@bfintal bfintal added the [Type] Bug An existing feature does not function as intended label Jan 12, 2024
@jordesign jordesign added [Feature] Typography Font and typography-related issues and PRs Needs Testing Needs further testing to be confirmed. labels Jan 14, 2024
@mikachan
Copy link
Member

Thanks for reporting, @bfintal! We're discussing how best to handle font exports when a theme is exported here: #54226. I'll close this issue as a duplicate, but please feel free to join in the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Typography Font and typography-related issues and PRs Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants