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

Align size/center of mass #477

Closed
dy opened this issue Jun 24, 2017 · 6 comments
Closed

Align size/center of mass #477

dy opened this issue Jun 24, 2017 · 6 comments
Labels
abandoned Pull requests that have been abandoned by the contributor package Pull requests or issues that affect the NPM package

Comments

@dy
Copy link

dy commented Jun 24, 2017

Hey @danleech , awesome project, I use it in a couple of websites.

But I noticed a small problem - some of the icons are a bit displaced or have lesser visual mass, as in the example for my friend's site:

image

G+ and twitter look smaller than others.

Recently I created optical-properties tool for balancing alignment/mass of graphical symbols.

image

It worked really well in font-atlas-sdf.

It could be used to align the whole icon set - making sure the visual center and mass of icons is same.

What are your thoughs?

Cheers!

@birjj
Copy link
Contributor

birjj commented Jul 7, 2017

Started implementing a test at birjolaxew/simple-icons/optical-sizing, but there are some issues:

  • optical-properties doesn't currently work on NodeJS, and fails to find bounds on images containing black pixels.
  • optical-properties seems to return different radius' if run multiple times[1]. I still haven't tracked down why.
  • The difference in radius returned by optical-properties between G+ and Instagram is minimal (308.13 vs. 306.79 at 512px size)

In short I don't think optical-properties can help us - the G+ icon is just as wide as the Instagram icon, so it'll have the same "radius". The problem here is that your design assumes that the height of icons is identical, while simple-icons assumes that the containing square of the icons is identical.

A solution here would be for simple-icons to have a viewbox as small as possible, with the longest side being 16 units, instead of a 16x16 viewbox (so the G+ icon might have a viewbox of 16x8 or similar). Users can then use CSS/similar to decide whether they want the height, the width or both of the icons to be identical.


[1] Output of current tool below:

~/dev/simple-icons » tools/visual-sizing.js googleplus
308.1280494616977 - googleplus.svg    <--
Average: 308.1280494616977
~/dev/simple-icons » tools/visual-sizing.js instagram googleplus 
306.7921026585487 - instagram.svg
309.1083239613655 - googleplus.svg    <--
Average: 307.9502133099571

@birjj
Copy link
Contributor

birjj commented Jul 7, 2017

Pinging @danleech for opinion on above solution.

@dy
Copy link
Author

dy commented Jul 7, 2017

@birjolaxew ok, I will try to tackle these issues down this weekend.

  • make work in nodejs
  • take alpha/custom channel
  • concave by height before detecting radius

@davidklebanoff
Copy link
Contributor

Any progress @dfcreative? This sounds very useful.

@davidklebanoff davidklebanoff added the awaiting reply Issues or pull requests awaiting reply from an individual before it may be addressed label Oct 10, 2017
@styfle
Copy link
Contributor

styfle commented Oct 18, 2017

have lesser visual mass

I noticed this myself. On my website, I used the StackOverflow and Keybase icons from simple-icons and they look a little thinner than the other icons.

@davidklebanoff davidklebanoff mentioned this issue Mar 25, 2019
3 tasks
@PeterShaggyNoble
Copy link
Member

Closing this out due to inactivity. If anyone would like to continue working on this then please feel free to open a new issue or PR.

@PeterShaggyNoble PeterShaggyNoble added abandoned Pull requests that have been abandoned by the contributor package Pull requests or issues that affect the NPM package labels Jun 2, 2020
@ericcornelissen ericcornelissen mentioned this issue Sep 16, 2020
3 tasks
@ericcornelissen ericcornelissen removed the awaiting reply Issues or pull requests awaiting reply from an individual before it may be addressed label Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned Pull requests that have been abandoned by the contributor package Pull requests or issues that affect the NPM package
Projects
None yet
Development

No branches or pull requests

6 participants