summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_set.hpp
blob: 5714071650c54ab6fe728847732052050606bad7 (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
#ifndef MBGL_TEXT_GLYPH_SET
#define MBGL_TEXT_GLYPH_SET

#include <mbgl/text/glyph.hpp>
#include <mbgl/util/vec.hpp>

namespace mbgl {

class GlyphSet {
public:
    void insert(uint32_t id, const SDFGlyph &glyph);
    const std::map<uint32_t, SDFGlyph> &getSDFs() const;
    const Shaping getShaping(const std::u32string &string, float maxWidth, float lineHeight,
                             float horizontalAlign, float verticalAlign, float justify,
                             float spacing, const vec2<float> &translate) const;
    void lineWrap(Shaping &shaping, float lineHeight, float maxWidth, float horizontalAlign,
                  float verticalAlign, float justify, const vec2<float> &translate) const;

private:
    std::map<uint32_t, SDFGlyph> sdfs;
};

} // end namespace mbgl

#endif