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

Added a script for turning Simple-Icons into an icon font. #1307

Closed
wants to merge 2 commits into from

Conversation

3 participants
@metaa
Copy link
Contributor

commented Mar 20, 2019

Simple Icons: The icon font

This PR adds a script that creates an icon font from all the icons included in simple-icons.
This font might then be distributed on its own or just reside in simple-icons to be used in it or alongside it (it could even replace the embedded SVGs on the overview page).

I recently worked on improvements to an NPM package over here which allows dropping in a simple configuration that then creates an icon font based on custom ligature settings and such.

Using this allows creating an icon font pretty easily.

The script included iterates through all available icons and then dynamically creates a configuration for the underlying package (icon-font-buildr) which then outputs an icon font in WOFF and WOFF2 format (both together are supported by all current browsers, see [1] & [2]).

There is also a (very minimalistic) test page located under /font/test.html that displays the icon font in use.

The following gif presents this test page with manual toggling of the font to see the actual text:

2019-03-20_23-53-41


Warnings

  • This depends on #1306 being merged. Those two icons messed up the icon font and made the glyphs either invisible or incredibly tiny with a huge line height.
  • This also depends on #3 in the repository of the icon-font-buildr package, as there currently is an issue that prevents this font from being generated due to a race condition effecting the generation's success when there is a lot of icons.

Dependencies

@birjolaxew

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

I feel like this would be better placed in a separate repository under the Simple Icons org, similar to our PDF repo.

It is definitely something we would be interested in though.

@metaa

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

I could do that and put it into a separate package if you'd like me to.

@ericcornelissen

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

I feel like this would be better placed in a separate repository under the Simple Icons org, similar to our PDF repo.

It is definitely something we would be interested in though.

Completely agree. If you can set this up as a separate repo and package that would be awesome @metaa 💯

@metaa

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

Sure thing, give me a moment

@metaa

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2019

I made a thing over here. Feel free to clone (not fork) that into the simple-icons org.

Check it out and see if you would be happy with what I put up there.
Please also check if the decisions I made about versioning (see CONTRIBUTING.md) seems alright to you.

I intentionally decided against the package just pulling the newest version of simple-icons here.

image


NOTE: this still depends on d896de5 being merged to master and #3 being merged and will not work without manual adjustments just yet.

@ericcornelissen

This comment has been minimized.

Copy link
Member

commented Mar 24, 2019

I closed this Pull Request and invited you to the organization @metaa, that way you can just transfer the repository 😉

The setup of the repo is fine by me. I would move the "Development" section to the contributing guidelines, and keep the README to just "Usage". I think, like with simple-icons-pdf, we want to keep development in that repo to a minimum anyway.

It would be great if we can automatically publish a release of the font package with the regular package though 🤔 That might be doable if when we get access to Github Actions.

One problem I'm having is that the test page does not show icons, but text instead... Any idea why?

@metaa

This comment has been minimized.

Copy link
Contributor Author

commented Mar 24, 2019

It would be great if we can automatically publish a release of the font package with the regular package though 🤔

That's why I wanted to merge it in instead of having it separate 😛

One problem I'm having is that the test page does not show icons, but text instead... Any idea why?

NOTE: this still depends on d896de5 being merged to master [...] and will not work without manual adjustments just yet.

If you replace the svgs of those two icons with something else, it will work.

@metaa metaa deleted the metaa:feature-iconfont branch Mar 24, 2019

@metaa

This comment has been minimized.

Copy link
Contributor Author

commented Mar 24, 2019

There we go, I moved it and adapted stuff 🙂
I leave the publishing of the NPM package and the Travis setup (never used Travis) to you guys.

@ericcornelissen

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

If you replace the svgs of those two icons with something else, it will work.

Of course 🤦‍♂️

That's why I wanted to merge it in instead of having it separate 😛

Haha of course, the problem is that at some point a monorepo for things like this because cumbersome (consider simple-icons-pdf, now simple-icons-font, soon vue-simpleicons and possibly at some point simple-icons-png considering the discussion in #980?).

There we go, I moved it and adapted stuff 🙂
I leave the publishing of the NPM package and the Travis setup (never used Travis) to you guys.

I will try to look into that as soon as possible. Although we have not yet set it up, it should be possible to publish multiple package updates at once from a merge in a single repository.

invited you to the organization @metaa

I changed your status to "outside collaborator" for now, which should still give you control over the simple-icons-font repository. If it turns out this limits your ability to contribute let me know and we will see what to do about it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.