1 #pragma once
2 
3 #include <mbgl/text/glyph.hpp>
4 
5 #include <mapbox/shelf-pack.hpp>
6 
7 namespace mbgl {
8 
9 struct GlyphPosition {
10     Rect<uint16_t> rect;
11     GlyphMetrics metrics;
12 };
13 
14 using GlyphPositionMap = std::map<GlyphID, GlyphPosition>;
15 using GlyphPositions = std::map<FontStack, GlyphPositionMap>;
16 
17 class GlyphAtlas {
18 public:
19     AlphaImage image;
20     GlyphPositions positions;
21 };
22 
23 GlyphAtlas makeGlyphAtlas(const GlyphMap&);
24 
25 } // namespace mbgl
26