Open nickidlugash opened 7 years ago
@kkaefer also mentioned that we could do something similar for font stacks to avoid duplicate CJK glyphs in the atlas when multiple font stacks contain the same CJK fallback font.
An alternative implementation might also be to hash the content of every image, and deduplicate based on pixel identity rather than relying on information in the sprite sheet (that'd also be the approach we'd have to take for glyph atlas deduping).
Main ticket for atlas improvements: https://github.com/mapbox/mapbox-gl-js/issues/141
@kkaefer and I chatted about the possibility of only adding unique sprite images to the atlas, and allowing multiple sprite names to reference the same location.
Spritezero can already generate spritesheets with unique sprite images only, with multiple sprite names referencing the same location on the spritesheet. If a style uses this spritesheet layout option, can we use this data to do something similar in the atlas? Or would we analyze all the images to dedup regardless of whether the spritesheet is deduped?
/cc @mapbox/gl-core