The two .svg files are the masters. Everything else is generated from them by rake icons, so the whole set stays in step when the artwork changes.
| File | |
|---|---|
ruby2d.svg |
Master. The gem on the Ruby 2D red, square. |
ruby2d_transparent.svg |
Master. The gem on its own, no background. |
ruby2d_1000px.png |
1000×1000, red background. |
ruby2d_1000px_transparent.png |
1000×708, transparent. |
apple-touch-icon.png |
180×180 for iOS home screens. No alpha — iOS composites it badly. |
favicon.ico |
16×16 and 32×32. |
ruby2d.icns |
macOS app icon, 16 through 512@2x. Ships with the gem. |
app-icon.png |
512×512, transparent, square. Ships with the gem beside the .icns. |
No suffix means the square logo on the red; _transparent means the gem alone.
The web and iOS icons are full-bleed squares — iOS masks them itself, so they must not have rounded corners baked in. The macOS icon is the exception: Apple's grid is an 824×824 rounded body centered on a 1024×1024 canvas, with the spare 100px around it left for the system shadow. rake icons applies that shaping, so ruby2d.svg stays a plain square.
The red is #f63c38. The gem's base polygon is that same red, so on ruby2d.svg the silhouette is deliberately invisible — the shape reads through the white stroke and the facets. Don't "fix" that by changing the base color.
Plain rake is the whole job: it deletes every generated file, rebuilds them from the masters, and offers to copy the results into both repos that use them.
rake # clean, regenerate, and copy everywhere
rake icons # just rebuild the rasters
rake web # ...and copy the web assets into ../ruby2d.com
rake assets # ...and copy the app icons into ../assets
rake web SITE=path/to # into a site checkout somewhere else
rake assets ASSETS=path/to # ditto for the assets repo
rake clean # delete every generated file
Copying is the only thing that reaches outside this repo, so it always asks first. You get the full plan up front, each file marked new, overwrite, or unchanged, then a single prompt covering the lot. Files that already match are left alone, and answering no doubles as a dry run. YES=1 is there for scripted runs; without it, a non-interactive shell aborts rather than waiting on a prompt nobody can see.
Because generation is reproducible, a rake with no artwork changes rebuilds everything, finds it all identical, and copies nothing.
rake assets targets the assets repo, which the gem vendors as a submodule. That's a separate checkout from the one inside the gem repo, so the icons don't reach the gem until you commit and push in ../assets and then update the submodule pointer.
Needs ImageMagick (brew install imagemagick) and Google Chrome.
Chrome does the rendering, not ImageMagick: without a librsvg delegate installed, IM's own SVG renderer silently drops the gem's white stroke.