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 Manager gives false duplicate font warnings. #59353

Open
peterwilsoncc opened this issue Feb 26, 2024 · 5 comments
Open

Font Manager gives false duplicate font warnings. #59353

peterwilsoncc opened this issue Feb 26, 2024 · 5 comments
Labels
[Feature] Font Library [Type] Bug An existing feature does not function as intended

Comments

@peterwilsoncc
Copy link
Contributor

Description

When uploading Noto Serif via the Font Managers uploads tab, I'm seeing false warning of duplicate fonts that are blocking uploads of some files.

I am unable to upload NotoSerif-Thin and NotoSerif-ThinItalic as a result.

The error I am seeing is:

Some font faces were installed. There were some errors. Fetch error: A font face matching those settings already exists. Fetch error: A font face matching those settings already exists.

I'm not really clear on what the error is referring too.

Step-by-step reproduction instructions

  1. Download Noto Serif from Google Fonts (don't use the built in importer)
  2. Select all the files with the NotoSerif- prefix
  3. Go to Site Editor > Styles > Typography > Font Manager > Upload
  4. Drag the files to the upload target area
  5. The error

Screenshots, screen recording, code snippet

Gif of upload process.

Note that I drag in 18 files but only 16 are imported.

upload-error

Environment info

  • WordPress 6.4
  • Gutenberg trunk @ 4d5fd5a

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

@peterwilsoncc peterwilsoncc added [Type] Bug An existing feature does not function as intended [Feature] Font Library labels Feb 26, 2024
@annezazu
Copy link
Contributor

Adding to 6.5 but noting that this was was tested with GB trunk rather than with 6.5 beta 2.

@pbking
Copy link
Contributor

pbking commented Feb 27, 2024

The reason for the error is because two of the font faces being uploaded (ExtraLight and Thin I believe) have the same weight value (250). Type/weight is how the client keeps typefaces unique. I'm not sure what else is different to make those to font faces unique but when the second of that pair is sent it isn't considered unique.

@ntsekouras
Copy link
Contributor

It seems there is also some race conditions when uploading fonts with same type/weight. This could result in the same name in the list and not sure how it affects everything else..

The real question for me here is how a font can be different with same type and weight? Is it an alias or there could be more differences? If there are more differences, should they be taken into account on how we construct a unique id?

@youknowriad
Copy link
Contributor

Given that RC1 is today I'm removing this one from 6.5.

@colorful-tones
Copy link
Member

Hi folks,
We are only one week away from the Beta 1 cut-off date for WordPress 6.6. This issue hasn’t seen any movement in a while, so we (the editor triage leads of the 6.6 release) have decided to remove it from the WordPress 6.6 Editor Tasks project board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

6 participants