summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph.cpp
blob: 3dca03504cc49c4ed6fa8919a7c9e629e0703646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <mbgl/text/glyph.hpp>

namespace mbgl {

// Note: this only works for the BMP
GlyphRange getGlyphRange(char32_t glyph) {
    unsigned start = (glyph/256) * 256;
    unsigned end = (start + 255);
    if (start > 65280) start = 65280;
    if (end > 65535) end = 65535;
    return { start, end };
}

}