Skip to content

Commit

Permalink
Add spritezero icons and instructions (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis authored Feb 20, 2024
1 parent e628783 commit e532179
Show file tree
Hide file tree
Showing 11 changed files with 6,186 additions and 2,066 deletions.
35 changes: 35 additions & 0 deletions basemap/assets/README.md
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
```
Loading

0 comments on commit e532179

Please sign in to comment.