WordPress / dashicons

Dashicons, the WordPress admin icon font. For the official resource, please see the WordPress Developer Hub.
https://developer.wordpress.org/resource/dashicons/
GNU General Public License v3.0
564 stars 185 forks source link

Fix incorrect menu-alt unicode address. #349

Closed adiloztaser closed 5 years ago

adiloztaser commented 5 years ago

When I was investigating why the mobile menu icon is not displaying properly in 5.2-alpha, I realized the icon unicode location is not as the old font was.

https://core.trac.wordpress.org/ticket/46611

jasmussen commented 5 years ago

Nice patch, thank you.

The new unicode address after this patch is 61992 in decimal, and f228 in utf-16.

The previous unicode address was 61707, which looks to be sequential after the previous icon, email-alt2, which could suggest we simply forgot to apply the correct icon address. This converts to f10b in utf-16.

Two tasks now:

  1. Let's verify that f228 is the correct address, and not f10b.
  2. Let's verify, just to be sure, what the address of email-alt2 was as well, and be sure that's correct. It looks auto generated, which could be fine, but let's be sure.

I reinstalled Glyphs Mini and opened the old Dashicons font, and it looks like this patch is correct:

Screenshot 2019-03-25 at 08 49 28

But it looks like the hunch about email-alt2 was also correct :( it's f10b in the new font, and f465 in the old font:

Screenshot 2019-03-25 at 08 50 23

It seems like it would be good for us to do a 1:1 comparison of ever icon in the old and the new font, and match the unicode addresses. I've a bit on my plate so could use some help here, it would probably go something like this:

  1. Download a font editor. I use Glyphs Mini, but I would wager https://fontforge.github.io/en-US/ works as well.
  2. Open the new font (from here https://github.com/WordPress/dashicons/blob/master/icon-font/fonts/dashicons.ttf) and the old font (here's a copy: https://cloudup.com/cGMYeeOQbGD)
  3. Compare unicode addresses, with the old version as the source of truth

I would suspect nearly all of the icons in the new font are in the correct addresses. But we should verify.

CC: @desrosj

jasmussen commented 5 years ago

Okay here's investigative work:

Icons that are new (and therefore codepoint doesn't matter):

Icons that are missing or weird:

NOTE that some of the above icons are currently stored in svg-unused, but since they ARE actually used they should be moved out of that folder

Codepoints that need fixing:

Next I'll try to take a stab at these codepoints, though note there are still some questions in the above that need answers.


Duplicate icons in the old:

Screenshot 2019-03-25 at 10 55 39

Missing camera from the new:

Screenshot 2019-03-25 at 11 09 55

Broken rest api icon:

Screenshot 2019-03-25 at 11 26 09

Broken editor-ol-rtl icon:

Screenshot 2019-03-25 at 11 54 31

Missing chunky menu icon:

Screenshot 2019-03-25 at 11 48 19

obsolete twitter icon:

Screenshot 2019-03-25 at 11 48 21

Editor RTL/LTR in the new font:

Screenshot 2019-03-25 at 11 55 11 Screenshot 2019-03-25 at 11 55 39

Editor RTL in the old:

Screenshot 2019-03-25 at 11 56 04
jasmussen commented 5 years ago

350 tries to fix the above.