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

Update codepoint ranges #762

Closed
jmederosalvarado opened this issue Jan 12, 2022 · 6 comments
Closed

Update codepoint ranges #762

jmederosalvarado opened this issue Jan 12, 2022 · 6 comments

Comments

@jmederosalvarado
Copy link

🎯 Subject of the issue

After the addition of various symbols like codicons, codepoint ranges in the wiki are outdated. Could we please update it? It would be great to update the website as well.

I'd be happy to submit a PR if someone pointed out how to extract codepoint ranges from the patcher script.

@Finii
Copy link
Collaborator

Finii commented Jan 13, 2022

I'm not sure if Ryan's thumps-up means it will be fixed or it would be great to create a PR.

Anyhow, the ranges are given on lines 562+

"Seti-UI + Custom",         'Exact': False,                               'SymStart': 0xE4FA, 'SymEnd': 0xE531, 'SrcStart': 0xE5FA, 'SrcEnd': 0xE631
"Devicons",                 'Exact': False,                               'SymStart': 0xE600, 'SymEnd': 0xE6C5, 'SrcStart': 0xE700, 'SrcEnd': 0xE7C5
"Powerline Symbols",        'Exact': True,                                'SymStart': 0xE0A0, 'SymEnd': 0xE0A2, 'SrcStart': None,   'SrcEnd': None  
"Powerline Symbols",        'Exact': True,                                'SymStart': 0xE0B0, 'SymEnd': 0xE0B3, 'SrcStart': None,   'SrcEnd': None
"Powerline Extra Symbols",  'Exact': True,                                'SymStart': 0xE0A3, 'SymEnd': 0xE0A3, 'SrcStart': None,   'SrcEnd': None
"Powerline Extra Symbols",  'Exact': True,                                'SymStart': 0xE0B4, 'SymEnd': 0xE0C8, 'SrcStart': None,   'SrcEnd': None
"Powerline Extra Symbols",  'Exact': True,                                'SymStart': 0xE0CA, 'SymEnd': 0xE0CA, 'SrcStart': None,   'SrcEnd': None
"Powerline Extra Symbols",  'Exact': True,                                'SymStart': 0xE0CC, 'SymEnd': 0xE0D4, 'SrcStart': None,   'SrcEnd': None
"Pomicons",                 'Exact': True,                                'SymStart': 0xE000, 'SymEnd': 0xE00A, 'SrcStart': None,   'SrcEnd': None
"Font Awesome",             'Exact': True,                                'SymStart': 0xF000, 'SymEnd': 0xF2E0, 'SrcStart': None,   'SrcEnd': None  
"Font Awesome Extension",   'Exact': False,                               'SymStart': 0xE000, 'SymEnd': 0xE0A9, 'SrcStart': 0xE200, 'SrcEnd': 0xE2A9
"Power Symbols",            'Exact': True,                                'SymStart': 0x23FB, 'SymEnd': 0x23FE, 'SrcStart': None,   'SrcEnd': None  
"Power Symbols",            'Exact': True,                                'SymStart': 0x2B58, 'SymEnd': 0x2B58, 'SrcStart': None,   'SrcEnd': None
"Material",                 'Exact': False,                               'SymStart': 0xF001, 'SymEnd': 0xF847, 'SrcStart': 0xF500, 'SrcEnd': 0xFD46
"Weather Icons",            'Exact': False,                               'SymStart': 0xF000, 'SymEnd': 0xF0EB, 'SrcStart': 0xE300, 'SrcEnd': 0xE3EB
"Font Logos (Font Linux)",  'Exact': self.fontlinuxExactEncodingPosition, 'SymStart': 0xF100, 'SymEnd': 0xF12D, 'SrcStart': 0xF300, 'SrcEnd': 0xF32D
"Octicons",                 'Exact': self.octiconsExactEncodingPosition,  'SymStart': 0xF000, 'SymEnd': 0xF105, 'SrcStart': 0xF400, 'SrcEnd': 0xF505
"Octicons",                 'Exact': self.octiconsExactEncodingPosition,  'SymStart': 0x2665, 'SymEnd': 0x2665, 'SrcStart': None,   'SrcEnd': None  
"Octicons",                 'Exact': self.octiconsExactEncodingPosition,  'SymStart': 0X26A1, 'SymEnd': 0X26A1, 'SrcStart': None,   'SrcEnd': None
"Octicons",                 'Exact': self.octiconsExactEncodingPosition,  'SymStart': 0xF27C, 'SymEnd': 0xF27C, 'SrcStart': 0xF4A9, 'SrcEnd': 0xF4A9
"Codicons",                 'Exact': True,                                'SymStart': 0xEA60, 'SymEnd': 0xEBEB, 'SrcStart': None,   'SrcEnd': None  
  • Src is the to-be-patched font, Sym is the symbols font.
  • The values are closed ranges (i.e. both values including)
  • If no Src values are given the symbols are not shifted
  • For Octicons and Font Logos it is more complicated

Sorted by range start in --complete:

Name Codepoints Comment
Power Symbols 23FB - 23FE
Octicons 2665
Octicons 26A1
Power Symbols 2B58
Pomicons E000 - E00A
Powerline Symbols E0A0 - E0A2
Powerline Extra Symbols E0A3
Powerline Symbols E0B0 - E0B3
Powerline Extra Symbols E0B4 - E0C8
Powerline Extra Symbols E0CA
Powerline Extra Symbols E0CC - E0D4
Font Awesome Extension E200 - E2A9
Weather Icons E300 - E3EB
Seti-UI + Custom E5FA - E631
Devicons E700 - E7C5
Codicons EA60 - EBEB
Font Awesome F000 - F2E0
Font Logos F300 - F32D or F100 - F12D if neither Font Awesome nor Octicons present
Octicons F400 - F505 or F000 - F105 if Font Awesome not present
Octicons F4A9 or F27C - F27C if Font Awesome not present
Material F500 - FD46

The actual ranges could be smaller (did not check), because empty glyph slots are ignored, i.e. filled glyphs are 'compressed' in the patched font.

And then you might have noticed, that Octicons end at 0xF505 but Material starts at 0xF500 🙄
One would need to check what is really patched in in the overlapping region.

@Finii
Copy link
Collaborator

Finii commented Jan 13, 2022

image
https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points

Hmm, from my table above the F27C should be F4A9?

@jmederosalvarado
Copy link
Author

jmederosalvarado commented Feb 3, 2022

I just made the necessary changes to the codepoint ranges wiki page based on this code in the font patcher.

I've never contributed to a project wiki before, so I don't really know the workflow here, I've been reading and it seems to be no way for me to open a pr for this. So this is a link to my branch containing the changes.

@Finii
Copy link
Collaborator

Finii commented Feb 3, 2022

*laugh* Yes. I also wondered how the workflow is, and ... probably there is none.

I will review your branch (excellent idea!) and come back later.

@Finii
Copy link
Collaborator

Finii commented Feb 4, 2022

That worked very well! (The workflow).
Followed this here https://stackoverflow.com/questions/10642928/how-to-pull-request-a-wiki-page-on-github

Pushed your commit (and a small change of mine): https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points/_history

Thank you!

@Finii Finii closed this as completed Feb 4, 2022
@Finii Finii mentioned this issue Feb 4, 2022
2 tasks
@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants