-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Switch to the popular, maintained devicons/devicons repo from unmaintained vorillaz/devicons #615
Comments
The file-icons project might be an even better replacement. It looks to have unified styling and optimized SVG's across the old devicons, MFizz icons, and many new file-icons icons. These can also replace most of the existing nf-custom icons, except the folder ones, I guess. |
also related #233 |
Thank you so much for this project! 🥰 |
devicons/devicon does include a svelte icon. You can see all the current icons over on https://devicon.dev/ |
Also mentions file-icons: #342 |
Hate to be this guy, but any update on this? The maintained devicons repo has a bunch of modern stuff that's currently missing (e.g. helm, kubernetes, terraform, etc). |
Hi! I need some clarifications first though. Since some icons have been updated since the start of the devicons fork, so it's not a complete superset. @Finii perhaps you can answer this:
I personally am leaning towards 4. where we rename both to the username/repo format, but I fear this would break backwards compatibility which wouldn't be good. That is unless there's some way to indicate renamed sets somewhere. Anyways, let me know what you think, and hopefully I can take a look at adding the set in soon :) |
Hej @Snailedlt, thank you for the input. Switching from vorillaz/devicons to devicons/devicon is in fact on the Nerd Fonts Roadmap. What I wonder first, and just tried to check (for some seconds, superficially), is if there is any codepoint 'guarantee' at devicons/devicons. This means that the codepoint for a given symbol stays 'constant' over updates: If for example the Github glyph is It seems that this is not guaranteed. When I look at the not long ago commit Some icon sets seem to be aimed (solely) at web usage, where it might be of no relevance (people reference the glyphs via IDs). For desktop use as font this is rather strongly needed. This are the first few glyphs in the (ttf) font: There are empty slots. So you do not 'pack' all available icons in consecutive codepoint slots. But you still move? And there seems to be some icons not really suited for font use, like the left side Node-webkit ones (with the tiny text below), or Angular icon, which you could hardly read in any (un-scaled) text environment. But other people might find them useful. There seem to be 504 icons in the set (at the moment). The old devicons have 202 (both numbers including unusable meta glyphs). Would it fit into the 'old' space? If we look here https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points#overview it seems we have For me personally, your Plan 1 is the neatest. People already using devicons get refreshed icons, and we have less symbol duplication and naming chaos ;) Also options are always bad, because the majority of Nerd Font users (I assume) use the prepatched fonts distributed over several (3rd party) packages, and can not choose anyhow. So if devicons/devicons does not have a native codepoint guarantee (which I would assume right now), WE could of course introduce one here. Create a (manually updated after each update) glyph-to-codepoint assignment, and even assign the first codepoints in a way that the current glyph-to-codepoint mapping is kept intact (just same symbol updates). On the other hand is it strange to sort and allocate slots for another project.
I guess you talk about the This is getting too long :-) Fini |
Hi @Finii, I honestly don't know too much about fonts since I haven't been working on devicons for very long, and I've mostly been working on automation tasks. So pardon my inexperience. As I understand it I'm not sure if there's any strategy to how we create the font codepoints, or if it's an entirely externally automated process by Icomoon, which we use for font generation. I'm guessing that the codepoints might change depending on the order of the icons, but I'm not sure about that. It's worth taking a closer look at it though. I took a look at Icomoon's documentation for making a font, and it looks like the font can be changed manually. Therefore it should be possible to automate it via a Selenium script given a list of mappings between icons and their codepoints. You're correct in your assumption that devicons/devicon is more tailored towards web development, but I think we should strive to improve the experience for off-web usage too. Every web developer also uses local tools after all. Because of this, and the fact that we might integrate with other font collections who require so called "codepoint guarantee", I'd prefer it if it was implemented in the devicon project, and not nerd-fonts. Looking further into the devicon source code it looks like we might be able to just insert all the right codepoints into the I took the time to convert a single icon into a font using icomoon. This is the resulting .zip file: Anyways, I'm blabbering. Let me know what you think, and if the solution is obvious to you, and seems easy enough to implement, please feel free to do so. If not, I'll probably spend a week or so trying to figure this out 😅 I'll just throw in the complete
Click here to see the
|
About codepoints. You might know ASCII, which assignes numbers to certain 'letters', often used in code (examples). The letter 'A' has code So if you have a text document, or a word/writer file or a web site, if you want to have a This might sound obvious. But it is the same with all glyphs. For example (from your image above) the "Openal Plain" (whatever that is) should be displayed. You can insert the 'letter' with the code Web developers often do not do it this way. They like to insert not a 'letter' "Openal Plain" which might or might not be displayed correctly in the text editor, they want to insert The trick/need for the But if you have a text file, a writer document, a presentation, and you want to use the devisons there, no As there are ways to enter the code Here an example For the way to ensure constant codepoints, that of course depends on how your whole workflow is, and that can be more or less complex. I personally (for my projects) prefer a very obvious way, so that other maintainers, even first timers will be pushed with their noses to the solution. At Nerd Fonts it is a special plain text file that just does that: Map codepoints to actual outlines and add symbolic IDs to it: https://github.com/ryanoasis/nerd-fonts/blob/master/src/svgs/icons.tsv |
@Finii I think we can use the same approach that you used with a file indicating which icon belongs to which codepoint. Something as simple as this should do for our project, since the folders and names can be derived from the filenames. Aliases can be gathered from the aliases object in # Codepoint: filename
0: "svelte-original"
1: "typescript-plain"
2: "typescript-original"
3: "svelte-plain" Then we can use the yaml file above when generating the font with Icomoon. I think we have enough to get started now. I hope to see codepoints added soon, but we have some other features that take priority atm, so might not be until next year. Thank you for all your help @Finii! Edit: |
Closed because moved to #1095 |
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. |
Started actively working on this one. See draft PR mentioned above. |
Dear @Snailedlt I am about to add / switch over to your devicons 🎉 Looked at the repo and the recent ( That again is the topic codepoint guarantee. I believe you wrote above somewhere you would rather like to introduce the codepoint assignment on your side - albeit you are tailored to web usage where codepoints do not really matter at all. I would suggest that you leave your repo and font creation as it is; and I introduce the (fixed) codepoints on our side. This has two pros for me:
If you (ever) drop icons the free slots (codepoints) will be reused by newly added icons. What do you think? More details while work progresses can be seen in the linked PR (#1691). EditFrom all the icon variants I would just pull one (1) per directory, here is a snipped from my yesterday's code. for d in $(find ${folder} -mindepth 1 -maxdepth 1 -type d | sort); do
candidate=$(find "${d}" -name "*plain.svg" -print)
if [ -z "${candidate}" ]; then
candidate=$(find "${d}" -name "*original.svg" -print)
fi
if [ -z "${candidate}" ]; then
candidate=$(find "${d}" -name "*plain-wordmark.svg" -print)
fi
if [ -z "${candidate}" ]; then
candidate=$(find "${d}" -name "*original-wordmark.svg" -print)
fi
if [ -z "${candidate}" ]; then
echo "NO HOPE for ${d}"
exit 1
fi This will for example reduce these 4 icons to just one, the one that makes most sense in a terminal environment: |
@Finii Thanks for reaching out again, this sounds good to me! Let me know if you have any questions, or if I can help with anything else :) I'm pretty sure this is fine for the other maintainers of devicons too, but I'll just tag them here in case they have any input :) @lunatic-fox @Panquesito7 @canaleal @weh @ConX take a look at finii's last suggestion, and see if you have any input :) |
At the moment nerd-fonts seems to be based off of vorillaz/devicons. As it is what is linked everywhere on the website as well as here on GitHub. This repository is heavily outdated and unmaintained. The last commit was in 2017 and the last official release in 2015.
The devicons.ttf in this repo has also last seen a change in 2016.
Since then a lot of new projects came to life and new popular icons got added, that are not supported on there now. However there appears to be a fork of that repository, that actually still has regular updates. It also has about a third more GitHub stars in case that is any indicator of popularity.
Now this project may already somehow be used inside of nerdfonts. I can actually find the
nf-dev-ruby_on_rails (e73b)
icon on the cheatsheet which seems to be part of a commit from this April.However if this already is the case at least the links and documentation in this project should be updated to reflect this. As it may be confusing for people (like me) to figure out where to go to propose an icon that they would want to see inside of nerdfonts.
The text was updated successfully, but these errors were encountered: