Directory

Font Library: Google Fonts - generated file names are non-descriptive · Issue #58411 · WordPress/gutenberg · GitHub
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: Google Fonts - generated file names are non-descriptive #58411

Open
Tracked by #60528
colorful-tones opened this issue Jan 29, 2024 · 4 comments · May be fixed by #58474
Open
Tracked by #60528

Font Library: Google Fonts - generated file names are non-descriptive #58411

colorful-tones opened this issue Jan 29, 2024 · 4 comments · May be fixed by #58474
Assignees
Labels
[Feature] Font Library [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@colorful-tones
Copy link
Member

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.

Screenshot 2024-01-29 at 2 39 47 PM

@matiasbenedetto
Copy link
Contributor

Thanks for flagging this.
Here's a potential fix for it : #58474

@matiasbenedetto
Copy link
Contributor

matiasbenedetto commented Jan 31, 2024

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?

@colorful-tones
Copy link
Member Author

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. 👍

@creativecoder
Copy link
Contributor

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.

#60402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants