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