unvt / sprite-one

MIT License
13 stars 6 forks source link

SDF icon option to generate sprite #2

Closed JinIgarashi closed 11 months ago

JinIgarashi commented 2 years ago

elastic/spritezero has an option to generate SDF icon. spritezero of elastic version relies on @elastic/fontnik which also have similar issue with mapnik, I am not sure SDF icon can be generated without fontnik library.

However, it would be good if sprite-one also can have an option for SDF icon.

smellman commented 2 years ago

I see. I don't know how to generate SDF icons however I will try it.

JinIgarashi commented 2 years ago

This stackoverflow can be useful for generating SDF icon

https://stackoverflow.com/questions/63299999/how-can-i-create-sdf-icons-used-in-mapbox-from-png

JinIgarashi commented 2 years ago

got some hints in maplibre's slack. The following library can be used to generate SDF icons

https://lib.rs/crates/build_pbf_glyphs