summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_range.hpp
blob: dd39e092b7498d9efef6b0e889b4922205400710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <utility>
#include <cstdint>
#include <unordered_set>
#include <boost/functional/hash.hpp>

namespace mbgl {

typedef std::pair<uint16_t, uint16_t> GlyphRange;

struct GlyphRangeHash {
    std::size_t operator()(const GlyphRange& glyphRange) const {
        return boost::hash_value(glyphRange);
    }
};

typedef std::unordered_set<GlyphRange, GlyphRangeHash> GlyphRangeSet;

constexpr uint32_t GLYPHS_PER_GLYPH_RANGE = 256;
constexpr uint32_t GLYPH_RANGES_PER_FONT_STACK = 256;

} // end namespace mbgl