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

Reduce complexity in output? #58

Closed
eugenesvk opened this issue Feb 23, 2016 · 6 comments
Closed

Reduce complexity in output? #58

eugenesvk opened this issue Feb 23, 2016 · 6 comments

Comments

@eugenesvk
Copy link

Partially following up on #42 and also continuing my thoughts after dealing with #56 may I offer a few thoughts on how to reduce the staggering complexity in the number of fonts produced by the patcher?

With short names (e.g. "NC" instead of "Nerd Font Complete") Windows version is never needed.
Also, we could also get rid of most of thee complexity with variations.

Currently, you have two conflicts among glyph sets:

  1. 'Custom SetiUI' (52 glyphs) and 'Devicons' (198)
  2. 'FontAwesome' (609) and 'Octicons' (164)
    For the 1st there is no variation, 'SetUI' takes precedence. For the 2nd you either shift 'Octicons' if 'FA' is present or just have 'Octicons' in default positions without 'FA'.

So, in your scheme, only two fonts are needed:
2a) complete with 'Octicons' shifted and 'FA' in default position and
2b) complete with 'Octicons' in default position and 'FA' shifted

  • either completely or
  • have 'FA' glyphs following 'Octicons' range remain in their spot (~400 glyphs) and only shifting first ~200 (bigger than 164 above since 'Octicons' has a lot of holes in its range)

That's it in the current implementation!

Personally, I'd prefer in the 1st conflict to prioritize 'Devicons' to make it match the intended codepoints and allow using well-established reference tables (https://vorillaz.github.io/devicons/#/dafont) and then just shift 'SetiUI' to right after 'Devicons'

@eugenesvk
Copy link
Author

I've customized your script for my own purposes to follow this logic (prioritizing 'Devicons' over 'SetiUI', moving 'SetiUI' right after 'Devicons') and only retaining 'FA' glyphs that don't conflict with 'Octicons' (haven't tested yet moving the displaced glyphs elsewhere).

Now that I've thought of additional simplification (with only two fonts required) the patcher could have those two additional aggregate options for producing SourceFontNFA prioritizing 'FA' and SourceFontNO prioritizing 'Octicons'.

If you're interested in such a simplification, I'd be happy to do a PR with the script and help with fixing the names for couple of fonts that I use myself.

@ryanoasis
Copy link
Owner

I really appreciate your ideas here and they make a lot of sense. 🙇

These are suggestions I will definitely and probably need to consider, especially the 'windows version' possibly just trimming the names no matter what. Especially if that actually makes things less confusing to someone coming to download the fonts.

With short names (e.g. "NC" instead of "Nerd Font Complete") Windows version is never needed.

Yeah correct. This might be the way to go. Have to think about this and perhaps get some more opinions (if possible) 😄

For the 1st there is no variation, 'SetUI' takes precedence.

Sorry didn't quite understand what you meant here. It seems like later you contradicted by saying you prefered 'Devicons' to take priority over 'Seti-UI' or maybe I misunderstood.

Personally, I'd prefer in the 1st conflict to prioritize 'Devicons'

Yeah that makes sense. Originally when this font started it was just 'Seti-UI' and those were moved for some reason that I currently do not remember (I will have to check). But yes when 'devicons' was added the conflict was apparent only then.

Really the only problem with moving 'Seti-ui' is that it would break vim-devicons which relies upon the specific codepoints for glyphs and was the catalyst of this project even existing 😛. However there is a good target opportunity to move around glyph positions for version 1.0.0 of vim-devicons is released (following semver) because there are going to be breaking changes already planned for 😄

Anyway, yes these are all possible at some point 👍

@eugenesvk
Copy link
Author

You're right, I do prefer 'Devicons' to take precedence. I was just assuming that this choice, once made, is constant and doesn't offer variations. Only in this sense there is no variation.
But technically you're correct, you could offer two variations instead of one — with Devicons as prio and SetiUI as prio.
In light of the fact that codepoints will be broken in vim-devicions anyway, I'd just suggest you respect the glyphs that actually make part of the project name :) and leave Devicons at default codepoints, shifting SetiUI and still having only one font as output.
If that were not feasible, then yes, two fonts would be a better alternative and that would increase the total complexity to four variations:

  1. Devicons + FA prio
  2. Devicons + Octicons prio
  3. SetiUI + FA prio
  4. SetiUI + Octicons prio

P.S.
Btw, I've noticed that your custom SetiUI glyphs are bigger than the default ones. How did you do that?

@ryanoasis
Copy link
Owner

@eugenesvk Yeah I think this should be feasible and done at the 1.0.0 release since it will be a breaking change for both projects.

A few other interesting motivator to decrease the number of Fonts:

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

Made the `context` segment customizable.
@ryanoasis ryanoasis mentioned this issue Oct 16, 2016
@ryanoasis
Copy link
Owner

going to close this as we will be changing the mappings for the next major version. thanks

@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.
Projects
None yet
Development

No branches or pull requests

2 participants