summaryrefslogtreecommitdiff
path: root/src/mbgl/text
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-09-19 15:20:03 -0700
committerChris Loer <chris.loer@mapbox.com>2018-10-15 13:15:46 -0700
commitbc718257748f1ad87658e85f8c31b574afca57a9 (patch)
tree10ca9f0b762362102482d0614e2d04feab419730 /src/mbgl/text
parentfed55418f21719149e510a6c49836ba58a5da2c2 (diff)
downloadqtlocation-mapboxgl-bc718257748f1ad87658e85f8c31b574afca57a9.tar.gz
[core] Bidi support for styled text.
Remove use of QString from non-ICU Qt stub bidi implementation since we weren't making use of it.
Diffstat (limited to 'src/mbgl/text')
-rw-r--r--src/mbgl/text/bidi.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/text/bidi.hpp b/src/mbgl/text/bidi.hpp
index 59d306489c..d90f3e5d1b 100644
--- a/src/mbgl/text/bidi.hpp
+++ b/src/mbgl/text/bidi.hpp
@@ -14,17 +14,21 @@ class BiDiImpl;
std::u16string applyArabicShaping(const std::u16string&);
+using StyledText = std::pair<std::u16string, std::vector<uint8_t>>;
+
class BiDi : private util::noncopyable {
public:
BiDi();
~BiDi();
std::vector<std::u16string> processText(const std::u16string&, std::set<std::size_t>);
+ std::vector<StyledText> processStyledText(const StyledText&, std::set<std::size_t>);
private:
void mergeParagraphLineBreaks(std::set<std::size_t>&);
std::vector<std::u16string> applyLineBreaking(std::set<std::size_t>);
std::u16string getLine(std::size_t start, std::size_t end);
+ std::u16string writeReverse(const std::u16string&, std::size_t, std::size_t);
std::unique_ptr<BiDiImpl> impl;
};