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

Wrong codepoints for Octoicons #34

Closed
dritter opened this issue Sep 25, 2015 · 20 comments
Closed

Wrong codepoints for Octoicons #34

dritter opened this issue Sep 25, 2015 · 20 comments

Comments

@dritter
Copy link

dritter commented Sep 25, 2015

Hi again. ;)

This time the codepoints for octoicons seem to be wrong. Haven't found a pattern there. If I do an echo "\uF020" "\uF000" "\uF001" "\uF005" "\uF0B2", none of the correct symbols show up:
bildschirmfoto 2015-09-25 um 11 08 29
Ignore the wrong symbols in the theme..

Tested with NerdFonts 0.5.0 Knack Plus Nerd File Types Plus Font Awesome Plus Octicons Plus Pomicons with iTerm2 on OSX Yosemite.

@ryanoasis ryanoasis modified the milestone: v0.6.0 Sep 25, 2015
@ryanoasis
Copy link
Owner

Thanks. Looks like I have overlooked something when fixing font awesome. Will take a look.

@ryanoasis
Copy link
Owner

@dritter Okay so the problem is both Font Awesome and Octicons start their glyph range at f000 so I had to pick one to take precedence. I chose Font Awesome and moved Octicons to a different range when both sets of glyphs are in the patched font.

If you want to use the original unicode codepoints for Octicons you will have to use Knack Plus Nerd File Types Plus Octicons or one that does not add Font Awesome

@dritter
Copy link
Author

dritter commented Nov 1, 2015

@ryanoasis so that means that the code points differ if I use a variant with or without Font Awesome? IMHO it is better to have consistent code points across different variants of the patched fonts. That would make life easier for 3rd party projects that rely on your fonts. And even for yourself: You than have to provide a correct icon/code point-table for each variant.

@ryanoasis
Copy link
Owner

@dritter for Octicons yes that is correct.

You make a good point and it is worth considering. My thought was to try to keep all glyphs at their original position unless there are conflicts but you brought up the other side of it that there would be less consistently

@dritter
Copy link
Author

dritter commented Nov 1, 2015

I am unsure about this issue as well.
Either every project maintains a version for every different font, or for every version. Both are not very good. But now as you say it, maybe relocating is worse. It is better to provide interoperability between the font (that users choose once) and different projects (that users switch more frequently).

Example:
It is more likely for someone to use programs which require powerline-icons like a ZSH-theme, a VI-status bar and a tmux theme than to switch fonts. So the three different programs should rely on the "standard" code points for the powerline-icons than special settings the user must to for every program.

Man, I am really indifferent about that.. 😁

@ryanoasis
Copy link
Owner

Good points. Yeah it is a catch 22 in some sense 😄

@ryanoasis
Copy link
Owner

I will at least do an update for Octicons to https://github.com/github/octicons/releases/tag/v3.1.0

@dritter
Copy link
Author

dritter commented Nov 7, 2015

👍

@ryanoasis ryanoasis removed this from the v0.6.0 milestone Nov 11, 2015
@ryanoasis
Copy link
Owner

Octicons now up to v3.2.0 so that'll be the one I include more than likely

@ryanoasis
Copy link
Owner

Latest Octicons should now be included in v0.6.0 but the main point of this ticket is still to be discussed so leaving it open for now.

@eugenesvk
Copy link

May I suggest an alternative solution (granted, there is no ideal one unless those fonts decide to change their glyph codepoints and that's unlikely)?
Current font map

Octicons:          ~165 in F000-27C
Font Awesome (FA): ~619 in F000-29E

If Octicons is a more popular font (with the GitHub support and all), it should have a higher priority.
So, would it not be better to leave Octicons as is, but add FA glyphs after Octicons range (so that in end you'd have first ~165 glyphs of FA overwritten by Octicons).
This way you could have full Octicons support and partial FA (except for the first ~165 glyphs), which might be better vs losing Octicons (I'd consider moved codepoint a lost one since all standard references would be incorrect).

P.S.
If you don't want to just discard those first FA glyphs, you could move them somewhere else, though don't see that would be of much help.

FluxAugur pushed a commit to FluxAugur/nerd-fonts that referenced this issue May 25, 2016
…t_fix

Put RPROMPT on first line of dual-lined prompts.
@chopfitzroy
Copy link

So just out of curiosity if I have font awesome and octicons installed how to I reference octicons?

@ryanoasis
Copy link
Owner

@CrashyBang If you are using one of the patched fonts with both glyph sets (e.g. 'Complete') then the Octicons will be in a new range (f400 to f497) and not their original range (f000 to f0db). This is due to a conflict of ranges with Font Awesome.

see below:

Original Range

octicon-original-range

New Range (when you have Font Awesome)

octicon-new-range

@chopfitzroy
Copy link

@ryanoasis awesome sorry I was not sure of the range number (4) i.e 4XXX if that makes any sense?

This is awesome thank you!

@ryanoasis
Copy link
Owner

@CrashyBang No problem 😄 It should probably be clarified in the readme because I can see where it would be confusing right now 😊

@yarthur
Copy link

yarthur commented Jan 13, 2017

I happened to notice a few things while playing around with my shell prompt.

While the readme links to the wiki page, the graphics on the wiki page are wrong. There's a broken/missing image under "Original Codepoints", and the image under "New Codepoints", I believe, actually shows the original ranges.

At the same time, it seems like some of the ranges on the correct image above are off, which I assume is due to changes that came about with more recent updates.

@ryanoasis
Copy link
Owner

@yarthur Thanks for pointing that out and reminding me. So I am still in the process of recovering my primary OS 😢 but looks like I had forgotten to upload that image to the wiki.

I will update them both sometime this weekend if I get back 100% up 😄

@ryanoasis
Copy link
Owner

@yarthur Wiki page has been fixed

@dritter Any strong objections on closing this issue? It seems we have settled on leaving the code points where they are in the Nerd Fonts Complete variations (the standard one 99.9% of users will use anyway)

If something changes at this point the major version would have to bump anyway due to breaking changes

@dritter
Copy link
Author

dritter commented Mar 16, 2017

Allright. Thanks @ryanoasis

@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 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants