-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spritezero icons and instructions (#832)
- Loading branch information
Showing
11 changed files
with
6,186 additions
and
2,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# OpenStreetMap-Carto Icons | ||
|
||
The icons stored in this directory come from the [OpenStreetMap-Carto](https://github.com/gravitystorm/openstreetmap-carto/) | ||
project released under the CC0 Public Domain Dedication, version 1.0, as published by Creative Commons. | ||
|
||
Created by Andy Allan <andy@gravitystorm.co.uk> and contributors. | ||
Based on original cartography by Steve Chilton and others. | ||
|
||
Both spritezero and spreet can be used to generate the png and json files from the SVG files. | ||
|
||
## Spritezero | ||
|
||
[Spritezero](https://github.com/elastic/spritezero#readme), while unmaintained, is currently the preferred tool to generate the png and json files from the SVG files. | ||
|
||
``` | ||
volta install node@10 | ||
npm install -g @elastic/spritezero-cli | ||
spritezero --ratio=1 --sdf icons@1x icons | ||
spritezero --ratio=1 --sdf icons@2x icons | ||
spritezero --ratio=1 --sdf icons@4x icons | ||
``` | ||
|
||
We fake ratio 2 and 4 as spritezero's generated files are broken. | ||
|
||
## Spreet | ||
|
||
[Spreet](https://github.com/flother/spreet) is a promising alternative to spritezero, and we hope to use it in the future. | ||
However, the generated files are not yet as good as the ones generated by spritezero. | ||
|
||
``` | ||
cargo install spreet | ||
spreet --sdf --ratio 1 icons icons@1x | ||
spreet --sdf --ratio 2 icons icons@2x | ||
spreet --sdf --ratio 4 icons icons@4x | ||
``` |
Oops, something went wrong.