summaryrefslogtreecommitdiff
path: root/src/mbgl/util/i18n.hpp
blob: fe324f53620af4b15e4468f3bf05320c582a4588 (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
26
27
#pragma once

#include <string>

namespace mbgl {
namespace util {
namespace i18n {

/** Returns whether a character is a visible character. */
bool isVisible(uint32_t chr);

/** Returns whether a line break can be inserted after the character indicated
    by the given Unicode codepoint due to word breaking. */
bool allowsWordBreaking(uint32_t chr);

/** Returns whether a line break can be inserted after any character in the
    given string. If false, line breaking should occur on word boundaries
    instead. */
bool allowsIdeographicBreaking(const std::u32string& string);

/** Returns whether a line break can be inserted after the character indicated
    by the given Unicode codepoint due to ideographic breaking. */
bool allowsIdeographicBreaking(uint32_t chr);

} // namespace i18n
} // namespace util
} // namespace mbgl