Open colorful-tones opened 10 months ago
Thanks for flagging this. Here's a potential fix for it : https://github.com/WordPress/gutenberg/pull/58474
Should both the manually uploaded font files and those added from a font collection, such as Google Fonts, be renamed?
@colorful-tones, what do you think?
Thanks @matiasbenedetto for the effort here! I left my feedback in the Review. From my perspective - you've addressed the issue, and I approve of your PR. 👍
I put together a draft PR that may help with this. It sorts font files (from all collections) into subdirectories using the font family slug. Let me know what you think.
What problem does this address?
If you add Google Fonts in the Font Library the file names are random strings, e.g.
wp-content/fonts/fC1hPYBHe23MxA7rIedwVWytTyk.woff2
.What is your proposed solution?
It would be ideal to likely maintain Google's naming convention, or at least have the font name somehow applied so that site builders could glance at their
fonts/
directory and have an idea what fonts are installed without having to try and cross-reference what is available in the Font Library modal and infer a match.I'm not sure what kind of duplicate checking is already in place, but this may help alleviate duplicate font if there is a naming convention applied.