Nerd-fonts: [Suggestion] Fix invalid code points for some glyphs

Created on 3 Aug 2019  Β·  9Comments  Β·  Source: ryanoasis/nerd-fonts

Summary

The current builds overwrites some code points that Unicode Consorthium prohibits to use for custom glyphs. I want to change this by fixing font_patcher.

Problem Detail

Unicode defines Private Use Areas and the consorthium itself decide not to add characters on these areas. So we can add glyphs as we like.

The areas has these code points: U+E000..U+F8FF, U+F0000..U+FFFFD, U+100000..U+10FFFD.

But the Nerd Fonts is overwriting more code points than them. The font_patcher writes glyphs as below.

  • source: the ones from source font files.
  • current: the ones font_patcher writes into.

| Font Name | source | current | plan 1 | plan 2 |
|-------------------------|:---------:|:-------------:|:---------:|:-----------------------:|
| Seti-UI + Custom | E4FA-E52E | E5FA-E62E | ← | ← |
| Devicons | E600-E6C5 | E700-E7C5 | E630-E6F6 | E700-E7C5 (not changed) |
| Powerline Symbols | E0A0-E0B3 | ← | ← | ← |
| Powerline Extra Symbols | E0A3-E0D4 | ← | ← | ← |
| Pomicons | E000-E00A | ← | ← | ← |
| Font Awesome | F000-F2E0 | ← | ← | ← |
| Font Awesome Extension | E000-E0A9 | E200-E2A9 | ← | ← |
| Power Symbols | 23FB-2B58 | ← | ← | ← |
| Material | F001-F847 | F500-FD46 | E700-EF47 | F500-F8FF,E800-EC47 |
| Weather Icons | F000-F0EB | E300-E3EB | ← | ← |
| Font Logos (Font Linux) | F100-F11C | F300-F31C | ← | ← |
| Octicons | F000-F105 | F400-F505 | ← | ← |
| Octicons | 2665-2665 | ← | ← | ← |
| Octicons | 26A1-26A1 | ← | ← | ← |
| Octicons | F27C-F27C | F4A9-F4A9 | ← | ← |

It is the problem that font_patcher writes glyphs from Material into the range: U+F500 - U+FD46. This range overlaps areas that should not use for such purpose.

| area | name |
|----------------|----------------------------------------------------------------------------------------------|
| U+F900..U+FAFF | CJK Compatibility Ideographs |
| U+FB00..U+FB4F | Alphabetic Presentation Forms |
| U+FB50..U+FDFF | Arabic Presentation Forms-A |

Suggestion

So I suggest two plans to solve this.

plan 1

  1. Move Devicons just after Seti-UI + Custom.
  2. Move Material to U+E700..U+EF47.
  • Pros - Material will be still in a cluster.
  • Cons - Two glyph sets will be moved.

plan 2

  1. Move and separate Material into U+F500..U+F8FF, U+E800-U+EC47.
  • Pros - Only one set will be moved.
  • Pros - The former part of Material still has the same code points.
  • Cons - Material will be separated into two clusters.

I prefer _plan 2_ because it has less impact on the current builds. How do you think?

β˜• discussion ⚠ bug

Most helpful comment

I get you now. I am thinking 3.0 would have this change and many others: update to material design, and other icon additions and programming fonts. I would like to do a 2.1 release soon, next one might be a big that 3.0 major.

All 9 comments

Thanks a lot @delphinus . I appreciate the thought you put into this.

To be completely honest I wasn't careful enough to be sure the ranges remained within the Private Use Areas. We should definitely make sure to stay within the PUAs going forward :blush:

I think I like plan 2 or some variation of it as well. I would prefer plan 1 for something that wouldn't be a major release (e.g. 2.x.x).

We need to decide if we are following semver strictly or not, if strictly then this would technically be a breaking change either way and would require us to version as 3.x but at the same time it would "feel" wrong to bump to version 3 if this was the only major change.

Good plans and suggestions here and I am mostly in agreement with you. I am wondering about versioning and what exactly the ranges should/could be :smiley:

Thanks for agreement. The changes will be a breaking change indeed. But for releasing v3.0.0, the β€œCHANGES” might be so less than the ones in v2.0.0. πŸ€”

Yeah, your recommendation makes complete sense and obvious some changes need to happen.


But for releasing v3.0.0, the β€œCHANGES” might be so less than the ones in v2.0.0. thinking

Sorry, I didn't quite follow, can you elaborate?

I see there are a lot of changes in v1.1.0 β†’ v2.0.0. But if you use v3.0.0 this time, v2.0.0 β†’ v3.0.0 will have 1 diff (this issue) only. I was just curious. ;)

I get you now. I am thinking 3.0 would have this change and many others: update to material design, and other icon additions and programming fonts. I would like to do a 2.1 release soon, next one might be a big that 3.0 major.

Can you provide an update regarding this issue? That the Material Design set overrides non-PUA codepoints is a significant issue.

@aaronbell Unfortunately the update I am going to give is not what you want to hear: There really are no updates on any forward momentum on moving the Material Design codepoints. However, I am back at trying to get a release out, after that this is likely one of the top priorities. This will be a breaking change as far as Nerd Fonts goes so it would be a 3.0 release. I agree it is a significant issue.

Hope that helps.

@ryanoasis Thanks Ryan. Too bad. Unfortunately, I will not be adding full Nerd Fonts support to Cascadia Code until v3.0 is released as I am unwilling to include Material Design icons in their current location. International interoperability takes precedent.

@aaronbell I completely understand that position. Absolutely international support takes precedent as it should. The whole code points seeping outside of PUA is a big mistake on my part.

While there has been no momentum of the fix in terms of code I did start to group tasks under a new 3.0 milestone and there definitely is a pressure to make it right.

Thanks for your valuable input and straightforwardness.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gitfool picture gitfool  Β·  3Comments

jinmel picture jinmel  Β·  6Comments

lilyball picture lilyball  Β·  5Comments

logarytm picture logarytm  Β·  5Comments

ffernand picture ffernand  Β·  4Comments