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

READY FOR REVIEW/MERGE - Eschew using PNGs in favor of SVGs #148

Merged
merged 2 commits into from
Jun 20, 2020
Merged

READY FOR REVIEW/MERGE - Eschew using PNGs in favor of SVGs #148

merged 2 commits into from
Jun 20, 2020

Conversation

posita
Copy link
Collaborator

@posita posita commented Jun 11, 2020

By eliminating the mogrify processing dependency, downloading the most recent set of icons goes from hours to well under a minute. SVGs are also superior for scaling on larger cards. A few .png files remain, however (namely those not from game-icons.net in …/classes/…).

Because processing is now so quick, this also removes all icon copies from this repo. This saves a ton of space, but imposes a requirement on cloners to run node ./resources/tools/update-icons.js instead of relying on any checked-in snapshot.

Fixes #111.
Depends on #146.

posita added 2 commits June 10, 2020 18:05
* Ditch [`unzip`](https://www.npmjs.com/package/unzip) for
  [`yauzl`](https://www.npmjs.com/package/yauzl) to accommodate Node
  v12+. (See EvanOxfeld/node-unzip#122, which remains unfixed as of this
  submission.) Fixes #144.
* Don't overwrite icons by different authors with similar names, but
  instead rename to avoid collisions (`"foo.png"` → `"foo-2.png"`,
  `"foo-3.png"`, etc.). Fixes #145.
* Use `request` to wrap `https`, to properly follow `301`s when fetching
  the icons library.
* Fix `mogrify` argument syntax for more recent versions of
  ImageMagick (`-channel-fx` → `-fx`). Fixes #119.
* Exclude (filter out) non-PNG files from CSS/JS processing.
* Update `npm` packages.

Probably fixes #107 (but that issue should probably be closed anyway,
given its age and lack of detail).
By eliminating the `mogrify` processing dependency, downloading the most
recent set of icons goes from hours to well under a minute. SVGs are
also superior for scaling on larger cards. A few `.png` files remain,
however (namely those not from game-icons.net in `…/classes/…`).

Because processing is now so quick, this also removes all icon copies
from this repo. This saves a ton of space, but imposes a requirement on
cloners to run `node ./resources/tools/update-icons.js` instead of
relying on any checked-in snapshot.

Fixes #111.
Depends on #146.
@crobi crobi merged commit f8dcd28 into crobi:master Jun 20, 2020
@posita posita deleted the posita/1/png-no-svg-yes branch July 7, 2020 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace .png icons with .svg versions
2 participants